Joining all y-axis points by a smooth line
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pavan Kumar
am 5 Jun. 2019
Kommentiert: Star Strider
am 6 Jun. 2019
Dear Firends,
Need you suggestion.
I have the following matlab figure which have multiple y values for one x-point.
I want to join all the points by a smooth line as shown by the red.
If however, i use matlab plot or line function, it joing all the points according to increasing x-value and makes the plot noisy.
Can anyone suggest me how to join these points as shown by using matlab or any other program.
Thanking you.

0 Kommentare
Akzeptierte Antwort
Star Strider
am 5 Jun. 2019
Try this:
y = linspace(1.2, 3, 50);
x = sin(2*pi*y)*2000;
figure
plot(x, y, '-o')
grid
It would be easier if we had your data, since I do not know if they are sorted or random. If they are random, you would need to sort them first to use this approach.
7 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!