Effacer les filtres
Effacer les filtres

graph is not smooth

22 vues (au cours des 30 derniers jours)
Fareeha
Fareeha le 3 Août 2023
Commenté : Fareeha le 8 Août 2023
Greetings,
i am getting this type of wavy graphs while they should be smooth. i will appreciate any help.

Réponse acceptée

Cris LaPierre
Cris LaPierre le 3 Août 2023
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 commentaire
Fareeha
Fareeha le 8 Août 2023
thank you @@Cris LaPierre it works

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by