Plot one column matrix in range

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 日

0 投票

y=matrix;
x=linspace(0,10,numel(y));
plot(x,y)

カテゴリ

ヘルプ センター および File ExchangeLine Plots についてさらに検索

質問済み:

2021 年 4 月 28 日

編集済み:

2021 年 4 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by