graph is not smooth

9 次查看(过去 30 天)
Fareeha
Fareeha 2023-8-3
评论: Fareeha 2023-8-8
Greetings,
i am getting this type of wavy graphs while they should be smooth. i will appreciate any help.

采纳的回答

Cris LaPierre
Cris LaPierre 2023-8-3
Add more points to your line to give it a smoother appearance. Compare the 2 lines below, the first with 5 data points, and the 2nd with 41.
x1 = -2:2;
x2 = -2:0.1:2;
y1 = x1.^2;
y2 = x2.^2;
plot(x1,y1,x2,y2)
legend

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by