Info

This question is closed. Reopen it to edit or answer.

Hi, How do you use fzero constantly update an equation?

2 views (last 30 days)
Im trying to find the distance, x, at different values of mu
here is my code:
%nguyen_Kevin_HW4_PROBLEM4 function force=forceRoot() xguess=2; mu=linspace(.1,.55,100); for i=length(mu) xroot=fzero(@(xroot)subf(xroot,mu(i)),xguess); xsol(i)=xroot; end plot(mu,xsol) end %%%%
function f=subf(x,mu) m=18;%units Kg h=10;%units meters g=9.8;%meters/second^2 F=90;%units of newtons f=mu*m*g*sqrt(x^2+h^2)/(x+mu*h)-F; end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!