How to print OptmInfo (output) after fitting with lsqcurvefit

3 views (last 30 days)
Hello! I have the following code and I need to know Rsdnrm (resnorm) and the number of iterations:
[k,Rsdnrm,Rsd,ExFlg,OptmInfo,Lmda,Jmat]=lsqcurvefit(@kinetics,k0,tdata,cdata);
fprintf('\tRsdnrm:\t %1.4g \n',Rsdnrm)
fprintf('\tOptmInfo:\t %1.4g \n',OptmInfo)
For the last line it returns the error:
Error using fprintf
Function is not defined for 'struct' inputs.
I understand the error but I am very new using matlab so I don't know how to fix it.
Thanks in advance!

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!