为什么时间序列图的长度不同?

时间:2018-07-07 04:10:15

标签: matlab matlab-figure timeserieschart

我正在从PC上加载EEG信号数据,并试图从中绘制时间序列图  它。

p=dir('C:\Users\Shahriar\Documents\EEGProject\*.csv'); 
num=cell(size(p));
n=length(p);
for i=1:n
   [num{i}]=csvread(p(i).name,1,1);
end

时间序列图的代码如下:

 axes('Position',[0.01,0.9,1,0.1]);plot(x{1, 1}{1, 1}(:,[1,3]),'Color', [0,0,0]);legend('Black');
 axes('Position',[0.01,0.8,1,0.1]);plot(x{1, 1}{2, 1}(:,[1,3]),'Color', [1,0,0]);legend('Red');
 axes('Position',[0.01,0.7,1,0.1]);plot(x{1, 1}{3, 1}(:,[1,3]),'Color', [0,1,0]);legend('Lime');
 axes('Position',[0.01,0.6,1,0.1]);plot(x{1, 1}{4, 1}(:,[1,3]),'Color', [0,0,1]);legend('Blue');
 axes('Position',[0.01,0.5,1,0.1]);plot(x{1, 1}{5, 1}(:,[1,3]),'Color', [0,1,1]);legend('Cyan');
 axes('Position',[0.01,0.4,1,0.1]);plot(x{1, 1}{6, 1}(:,[1,3]),'Color', [1,0,1]);legend('Magenta');
 axes('Position',[0.01,0.3,1,0.1]);plot(x{1, 1}{7, 1}(:,[1,3]),'Color', [0.5,0.5,0.5]);legend('Gray');
 axes('Position',[0.01,0.2,1,0.1]);plot(x{1, 1}{8, 1}(:,[1,3]),'Color', [0.5,0,0]);legend('Maroon');
 axes('Position',[0.01,0.1,1,0.1]);plot(x{1, 1}{9, 1}(:,[1,3]),'Color', [0.5,0,0.5]);legend('Purple');
 axes('Position',[0.01,0.0,1,0.1]);plot(x{1, 1}{10, 1}(:,[1,3]),'Color', [0,0.5,0.5]);legend('Teal');

但是该图显示如下,它们的长度不同。但我需要与此相同的长度。如何生成具有相同长度的时间序列图?

0 个答案:

没有答案