Surface fitting tool, results accuracy

2 vues (au cours des 30 derniers jours)
alexis
alexis le 10 Nov 2011
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?

Réponse acceptée

Richard Willey
Richard Willey le 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

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by