Professional Documents
Culture Documents
for K=1:2:N
s1(K)=y(K)+y(K+1);
s1(K+1)=y(K)-y(K+1);
end
disp('o/p of 1st stage');
disp(s1);
for K=1:4:N
s2(K)=s1(K)+s1(K+2);
s2(K+1)=s1(K+1)+w3*s1(K+3);
s2(K+2)=s1(K)-s1(K+2);
s2(K+3)=s1(K+1)-w3*s1(K+3);
end
disp('o/p of 2nd stage');
disp(s2);
%calculation of stage 3
for K=1:8:N
s3(K)=s2(K)+s2(K+4);
s3(K+1)=s2(K+1)+w2*s2(K+5);
s3(K+2)=s2(K+2)+w3*s2(K+6);
s3(K+3)=s2(K+3)+w4*s2(K+7);
s3(K+4)=s2(K)-s2(K+4);
s3(K+5)=s2(K+1)-w2*s2(K+5);
s3(K+6)=s2(K+2)-w3*s2(K+6);
s3(K+7)=s2(K+3)-w4*s2(K+7);
end
disp('o/p of 3rd stage :');
disp(s3);