MATLAB: Iterative when have Loop

iterativeMATLAB

Dear,
I have to assume X and used the value in three For Loop and the sum of the results of the loops should be zero. In each loop, I have a numerical solution.
What is the best way to do iterative to Find X?
Thanks,

Best Answer

Put the code into a function that returns the sum of the three values, and then fzero() or fsolve() .
Related Question