plotting double timeseries - running into problems with plotting a as a proper time series
이전 댓글 표시
hello!
I am trying to plot a 10x2 double variable. When I looked at the actual variable, it is made up of two columns, the first being time, and the second being the value of my timeseries.
here are my variables:
figure;
plot(time, data)
But the figure I get individually plots time and the other 'data' separately, and not as time vs. data.
Can you help me? I have been trying to manually get rid of the one of the columns but it's not sustainable long term.
Thanks!
댓글 수: 3
Mathieu NOE
2020년 12월 30일
hello
so data contains time in first and your "real" data is the second vector
this will plot the "real" data vs time
plot(data(:,1),data(:,2))
nines
2020년 12월 30일
Adam Danz
2020년 12월 30일
The shapes of the variables indicate that you have two time series stored in 'data' and the plot should produce two lines.
Perhaps you want
plot(time, data(:,1))
% or
plot(time, data(:,2))
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!