我把程序改为6层分解,但却出现这句话。
s = load('1.txt');
[c,l]=wavedec(s,6,'db4');
[cd1,cd2,cd3,cd4,cd5,cd6]=detcoef(c,l,[1,2,3,4,5,6]);
ca6=appcoef(c,l,'db4',6);
subplot(511);plot(1:length(s),s);title('s');
subplot(512);plot(1:l(1),ca6);title('ca6');
subplot(513);plot(1:l(2),cd6);title('cd6');
subplot(514);plot(1:l(3),cd5);title('cd5');
subplot(515);plot(1:l(4),cd4);title('cd4');
subplot(516);plot(1:l(5),cd3);title('cd3');
subplot(517);plot(1:l(6),cd2);title('cd2');
subplot(518);plot(1:l(7),cd1);title('cd1');
??? Error using ==> subplot
Index exceeds number of subplots.
Error in ==> Untitled at 10
subplot(516);plot(1:l(5),cd3);title('cd3');
请问如何解决? |