Filter löschen
Filter löschen

How to create a MATLAB function based offf of a flow chart? using for example f1(x) when referencing a function

1 Ansicht (letzte 30 Tage)
I am trying to convert this flow chart into a MATLAB function with the commands:
Set: xL=a, xU=b, xm= (a+b)/2
If f(xL)*f(xm) < 0 set xU= xm If f(xL)*f(xm) > 0 set xL= xm If f(xL)*f(xm) = 0 xm is the root. Stop the algorithm.
Guidelines: function result=bisect(a,b,tol) %INPUT : a, b:search interval % tol:error tolerance %OUTPUT: result : root found
Thanks for the help!!

Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by