Plot one column matrix in range

조회 수: 7 (최근 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