Matlab 2D plotting by using given points

9 vues (au cours des 30 derniers jours)
Joy
Joy le 1 Mai 2022
my x coordinates are from 0 to 30, and my y coordinates are
y=[0.74,0,71,0.68,0.64,0.59,0.53,0.48,0.42,0.35,0.29,0.21,0.17,0.11,0.065,0.047,0.016,0.0066,0.0026,0.0010,0.0002,0,0,0,0,0,0,0,0,0,0];
how to plot the graph so that when x=0, y=0.74 so on

Réponse acceptée

Walter Roberson
Walter Roberson le 1 Mai 2022
Modifié(e) : Walter Roberson le 1 Mai 2022
Caution: you had 0,71 instead of 0.71
y=[0.74,0.71,0.68,0.64,0.59,0.53,0.48,0.42,0.35,0.29,0.21,0.17,0.11,0.065,0.047,0.016,0.0066,0.0026,0.0010,0.0002,0,0,0,0,0,0,0,0,0,0];
plot(0:length(y)-1, y)

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

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by