How can I get numerical output from 'fit' and 'int' functions?
Show older comments
Dear all,
I used the function 'fit' for fitting experimental data. Afterwards, I integrated this fit, and now I need to know at which x-value the fit reaches a certain y-value.
I can plot the integration and use the data cursor but would like to automate this. How can I get a matrix with the integration data in the workspace, or is there another way to accomplish this?
Thanks in advance!
Answers (1)
Torsten
on 13 Jul 2015
If the fitting function is "fun", apply fzero as
x_value = fzero(@(x)integral(fun,xmin,x)-y_value,[xmin xmax])
Best wishes
Torsten.
Categories
Find more on MATLAB 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!