Can MATLAB create a linear graph from polynomial graph?
3 views (last 30 days)
Show older comments
Volkan Yangin on 1 Oct 2016
Answered: Jang geun Choi on 2 Oct 2016
I have an elevation-distance graph on MATLAB and its type is polynominal and i must change the graph style from polynominal to linear for reckon without some values. I can use MATLAB Fitting Toolbox, but this operation takes too long time and i don't sure whether make an error or not.
Can MATLAB create a linear graph automatically? Or Do i have to use Fitting Toolbox for this purpose?
dpb on 1 Oct 2016
Don't follow what it is you're wanting do do here precisely, sorry. You mean you would want to approximate the above detailed very noisy curve with some linear piecewise sections, maybe? If so, how closely do you want the approximation to be--three gross sections good enough or what? To have a representation as is, probably the spline interpolant would be the choice--it'll have a lot of sections but those are essentially hidden from the user so doesn't really matter too much on the complexity.
Jang geun Choi on 2 Oct 2016
y=3*sin(x)+2*x+rand(size(x)); % example data
% linear regression
Find more on Graph and Network Algorithms 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!