Plot one column matrix in range

7 visualizaciones (últimos 30 días)
Karol T
Karol T el 28 de Abr. de 2021
Editada: Matt J el 28 de Abr. de 2021
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

Respuestas (1)

Matt J
Matt J el 28 de Abr. de 2021
Editada: Matt J el 28 de Abr. de 2021
y=matrix;
x=linspace(0,10,numel(y));
plot(x,y)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by