I want to solve an equation for a different value in each cycle of a for loop. I usually include the value that I am solving for in the m-file function but I can’t change the m file at each cycle in the for loop. Is there a way to solve the use fsolve but for a value !=0.
Share
You can use an anonymous function. So if your paramterised function is:
then you can iterate over different parameters thus:
(Untested)