I am given a DTFT, how can I calculate the frequency range where 65% of the total energy is contained? I did unwrap the phase, but I don't know if it's right(because my unwrapped plot looks the same as original). Can anybody help? I will appreciate it. Here it is my script:
% Read in the numerator and denominator coefficients
num = [0.1323 0.1323*0.1444 -0.1323*0.4519 0.1323*0.1444 0.1323];den = [1 0.1386 0.8258 0.1393 0.4153];% Compute the frequency response
w = 0:0.01:2*pi;h = freqz(num, den, w);% Plot the frequency response
subplot(2,2,1)plot(w/pi,real(h));gridtitle('Real part')xlabel('\omega/\pi'); ylabel('Amplitude')subplot(2,2,2)plot(w/pi,imag(h));gridtitle('Imaginary part')xlabel('\omega/\pi'); ylabel('Amplitude')subplot(2,2,3)plot(w/pi,abs(h));gridtitle('Magnitude Spectrum')xlabel('\omega/\pi'); ylabel('Magnitude')subplot(2,2,4)plot(w/pi,angle(h));gridtitle('Phase Spectrum')xlabel('\omega/\pi'); ylabel('Phase, radians')%unwrapping the phase
unwrap=unwrap(angle(h),0.8);figure, subplot(211)plot(w/pi,angle(h));gridtitle('Phase spectrum');xlabel('\omega/\pi'); ylabel('Phase, radians');subplot(212);plot(w/pi,unwrap);gridtitle('Unwrapped phase spectrum'); xlabel('\omega/\pi'); ylabel('Phase, radians');
Best Answer