graph is not smooth

16 ビュー (過去 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
  1 件のコメント
Fareeha
Fareeha 2023 年 8 月 8 日
thank you @@Cris LaPierre it works

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by