Write a MATLAB program to generate a sinusoidal signal consisting of frequencies 200Hz, 300Hz and 600Hz with sampling frequency of 2 kHz and pass it through a system H(z) which is cascade combination of two LTI systems H1(z) and H2(z) with zero initial condition and prove the output is same even if you change the order of H1(z) and H2(z) in the cascade connection.
"F_s = 2000;\\\\\nT_s = 1\/F_s;\\\\t = 0:T_s:1-T_s;\\\\f_1 = 200;\\\\y_1 = sin(2*pi*f_1*t);\\\\ plot(t,y);\\\\f_2 = 300;\\\\y_2 = sin(2*pi*f_2*t);\\\\plot(t,y_2);\\\\f_3 = 600;\n\\\\y_3=sin(2*pi*f_3*t);\\\\plot(t,y_3);\\\\H_1(z)fft = fft(y_1);\\\\H_2(z)fft = fft(y_2);\\\\H(z) = H_1(z)*H_2(z);\\\\plotH(z);\\\\H(z) = H_2(z)*H_1(z);\\\\plotH(z);"
Comments
Leave a comment