Smoothing curve plot with some data points
Show older comments
hello, everybody
I have these data and I hope to plot them with smooth line.
Is it possible to create a smooth curve through these data points? I tried polybuffer function and it looks better.
But for data smoothing I failed using interpolation due to drastic chanhge of data points.
However, I think there is some ways I think. If possible please help me some.
x = [-27.59;-32.36;-32.36;-24.99;-25.12;-32.62;-37.62;-42.62;-37.62;-37.62;-40.11;-40.11;-37.61;-33.36;-29.11;-27.11;-25.11;-20.61;-14.36;15.64;45.64;158.76];
y = [-16.55;-16.55;-16.55;-16.62;-16.69;-16.69;-25.44;-34.19;-51.69;-51.69;-42.98;-42.98;-51.73;-60.48;-69.23;-70.48;-71.73;-81.73;-104.23;-126.73;-149.23;-149.23];
pgon = polybuffer([x y],'lines',2);
plot(pgon,'FaceColor','r','FaceAlpha',1,'EdgeColor','none')
% plot(x,y)
Accepted Answer
More Answers (0)
Categories
Find more on Exploration and Visualization 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!