I made a secant method for complicated equation in MATLAB edit space. Like this… Function y = fcn(st, cq, a, g, …) f=''3600 * st * cq * a * ((((2 * g * gam * pi)……….'; (Flow Function eq)
Of course, there is simple secant method.
n=0; x = xa; fa = eval(f); x = xb; fb = eval(f); …….
and then I put this script in Embedded MATLAB of Simulink. For 'eval' function, I also put 'eml.extrinsic('eval') in it.
When I start the simulation, I could see an error *"Call to MATLAB function aborted : Error using ==> eval Undefined function or variable 'st'."*
Thanks for your help.
Best Answer