Surface fitting tool, results accuracy
1 view (last 30 days)
Show older comments
Hi everyone,
I use 'sftool' function and i take a 4th degree polynomial that i want. In the results window i have all Coefficients. How can i increase decimal places to the results window? Matlab has in memory the exact numbers, but if i copy the numbers (from results window) and paste it to excel i take only the 3 decimal digits. Unfortunately it is necessary to use Excel.. Can you help me with that?
0 Comments
Accepted Answer
Richard Willey
on 10 Nov 2011
Offhand, I don't know any way to change the display within the tool itself. With this said and done, its fairly easy to
1. Solve your problem using the sftool interface 2. Export your solution to base MATLAB 3. Display the resulting coefficients using the "long" format
Here's exactly what you're going to want to do
There is a menu inside sftool called "Fit" Open this up and chose the option called "Save to Workspace".
By default your model will be saved to the workspace as "fittedmodel". fittedmodel contains all of the regression coefficients generated by sftool.
What you want to do now is type "format long" to change the display in base MATLAB. You can then grab the individual regression coefficients from the fittedmodel. For example, your constant is stored as p0. You can retrieve the estimate for the constant by typing
fittedmodel.p0
regards
Richard
0 Comments
More Answers (0)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox 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!