I have an excel file with 5 columns X1/X2/X3/X4/X5 how to I plot 4 plots (X1,X2;X1,X3;X1;X4;X1;X5) on the same figure using the subplot command.
조회 수: 3 (최근 30일)
이전 댓글 표시
Do I use xlsread
댓글 수: 0
채택된 답변
KSSV
2016년 11월 28일
Yes you have to use xlsread....
data = xlsread('your excel file');
x1 = data(:,1) ;
x2 = data(:,2) ;
x3 = data(:,3) ;
x4 = data(:,4) ;
x5 = data(:,5) ;
figure
plot(x1,x5,'r') ;
%%use subplot or what ever
You can directly use plot(data(:,1),data(:,5)) , etc also
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!