How to display answers using polyfit
2 views (last 30 days)
Show older comments
Hello everyone.
I'm trying to use polyfit to analyze some data, I want a linear regression, but the slope of the line is small, approximately 1.33e-7, but when I use polyfit, it only returns the coefficient of slope as 0. How can I get it to display the true number?
0 Comments
Answers (3)
Star Strider
on 27 Oct 2012
Edited: Star Strider
on 28 Oct 2012
You may have scaling problems such that the slope and intercept may vary by several orders of magnitude. Experiment with:
format longE
0 Comments
Jan
on 27 Oct 2012
Perhaps you want to modify the display in the command line:
format long g
0 Comments
See Also
Categories
Find more on Linear and Nonlinear Regression 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!