Plot several signals but I want nudging or not overlap between them
이전 댓글 표시
Hello,
I have ERG responses, different traces to graph in a Excel file. I have the time in seconds and in different sheets the data for 10 different intensities. I want to graphs all the intensities in the same plot, but they overlap. I want to put offset or a nudging but I can´t make it work. Here is the code I run.
filename = 'C:\Users\Milagros\Desktop\24 Hs\meangraphs.xls';
time = xlsread(filename,1,'A1:A512');
y1 = xlsread(filename,2,'A1:A512');
y2 = xlsread(filename,2,'B1:B512');
y3 = xlsread(filename,2,'C1:C512');
y4 = xlsread(filename,2,'D1:D512');
y5 = xlsread(filename,2,'E1:E512');
y6 = xlsread(filename,2,'F1:F512');
y7 = xlsread(filename,2,'G1:G512');
y8 = xlsread(filename,2,'H1:H512');
y9 = xlsread(filename,2,'I1:I512');
y10 = xlsread(filename,2,'J1:J512');
hold on
plot(time,[y1,y2,y3,y4,y5,y6,y7,y8,y9,y10]);
hold off
What I get in fig 1 and what I want is in fig 2.
댓글 수: 2
You didn't ask for it, but you could probably make your life easier if you store the data in a single variable
ranges = 'A':'J';
for i=1:numel(ranges)
range = sprintf('%c1:%c512', ranges(i), ranges(i));
Y(:,i) = xlsread(filename,2,range);
end
Milagros ARIETTI
2015년 11월 26일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File 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!


