How to plot and curve through N points and find coordinates of K points from curve plotted (N<<<K)
5 views (last 30 days)
Show older comments
I am new to MATLAB. i wish to plot a curve through N points(N=7). Later from the curve plotted i wish to extract coordinates of K points (K=50). I did find some interpolation codes for curve passing through points. For 7 points we need a polynomial of degree 6. I find it to be complicated and st time curve does not match as needed. Will spline curve do?
0 Comments
Answers (1)
Walter Roberson
on 24 Aug 2015
coeffs = polyfit(x, y, 6);
newx = linspace(min(x), max(x), 50);
newy = polyval(coeffs, newx);
Will spline curve do? Probably not. But it will depend upon your data and upon the region where you need to interpolate and upon your meaning of "do".
7 Comments
See Also
Categories
Find more on Interpolation 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!