Plot one column matrix in range

6 次查看(过去 30 天)
Karol T
Karol T 2021-4-28
编辑: Matt J 2021-4-28
Hello, I have a matrix with one column [20x1] and I want to plot it, but so that all 20 results are evenly distributed. For example, I want to plot all 20 matrix elements from 0 to 10 on the x-axis.
I tried to do this way:
figure(1);
plot(20,matrix)
And I saw blank figure

回答(1 个)

Matt J
Matt J 2021-4-28
编辑:Matt J 2021-4-28
y=matrix;
x=linspace(0,10,numel(y));
plot(x,y)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by