Azzera filtri
Azzera filtri

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

1 visualizzazione (ultimi 30 giorni)
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!!

Risposte (0)

Categorie

Scopri di più su Modeling in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by