How to plot each row and column data in Matlab

조회 수: 2 (최근 30일)
Ankit Gupta
Ankit Gupta 2015년 9월 4일
편집: Ankit Gupta 2015년 9월 4일
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
Ankit Gupta
Ankit Gupta 2015년 9월 4일
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.

댓글을 달려면 로그인하십시오.

채택된 답변

Guillaume
Guillaume 2015년 9월 4일
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 :

추가 답변 (0개)

카테고리

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