Matlab 2D plotting by using given points

9 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2022-5-1
编辑:Walter Roberson 2022-5-1
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by