How to plot magnitude of DFT in Matlab?
To plot the magnitude and phase in degrees, type the following commands: f = (0:length(y)-1)*100/length(y); % Frequency vector subplot(2,1,1) plot(f,m) title('Magnitude') ax = gca; ax. XTick = [15 40 60 85]; subplot(2,1,2) plot(f,p*180/pi) title('Phase') ax = gca; ax.
How do you find the magnitude and phase of a signal?
To obtain the amplitude response, we take the absolute value of H(jω). To do this, we evaluate the magnitude of the numerator and the denominator separately. To obtain the phase response, we take the arctan of the numerator, and subtract from it the arctan of the denominator.