Borrar filtros
Borrar filtros

How to plot each row and column data in Matlab

4 visualizaciones (últimos 30 días)
Ankit Gupta
Ankit Gupta el 4 de Sept. de 2015
Editada: Ankit Gupta el 4 de Sept. de 2015
Hi all,
I have a matrix 12x25 (double),how can I plot each row in one figures and each columns in another. I can do that easily in excel but how to do in matlab?
I tried this:
num = xlsread('excelfile');
figure(1)
plot(num(1:end,:));
figure(2)
plot(num(:,1:end));
  1 comentario
Ankit Gupta
Ankit Gupta el 4 de Sept. de 2015
Thanks a lot , but how can I format the figure to its look like the excel figure? the figure coming of the plot looks different in Matlab.

Iniciar sesión para comentar.

Respuesta aceptada

Guillaume
Guillaume el 4 de Sept. de 2015
Transpose the matrix between the two plots:
num = xlsread('excelfile');
figure(1)
plot(num);
figure(2)
plot(num');
Note that 1:end is exactly the same as :

Más respuestas (0)

Categorías

Más información sobre Line 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