Thank you very much! That is perfect graph. I should follow your corrections and try it tomorrow! Thank you for your great corrections! Insang
I had one mistake.
Here are the new plots
I had to change
coef = eval(jopt);
coy = eval(jy);
@ Colin Macdonald
There seems to be a problem with the eval() function when it is used with
the results from a symbolic calculation.
The function given above calculates a symbolic matrix which it is
then trying to convert it to a numeric answer. I tried to use double instead of
eval but it still did not work. I then tried subs() to convert each symbolic symbol
to a number and that also failed. In the end I had to convert it to a function_handle
and then evaluate it at the given values.
Should the eval function work for this case?