MATLAB Code for Ploting Magnitude, Angle, Real, and Imaginary parts of a Signal

Evaluate e^jw/(e^jw-0.5) at 501 equispaced points between [0,pi] and
plot its magnitude, angle, real, and imaginary parts.



%%%%%%%%%%% START %%%%%%%%%%%%%%%
clc; 
w = [0:1:500]*pi/500;
 X = exp(j*w) ./ (exp(j*w) - 0.5*ones(1,501));
 magX = abs(X);
 angX = angle(X);
 realX = real(X); imagX = imag(X);
 subplot(2,2,1); plot(w/pi,magX); grid
 xlabel('frequency in pi units') ; title('Magnitude Part'); ylabel('Ma@tude')
 subplot(2,2,3); plot(w/pi,angX); grid
 xlabel('frequency in pi units'); title('Ang1e Part'); ylabel('Radians')
 subplot(2,2,2); plot(w/pi,realX); grid
 xlabel('frequency in pi units') ; title('Rea1 Part') ; ylabel('Real')
 subplot(2,2,4); plot(w/pi,imagX); grid
 xlabel('frequency in pi units'); title('1maginary Part'); ylabel('1maginary')
%%%%%%%%%%% END %%%%%%%%%%%%%%%

Contact:  
Mr. Roshan P. Helonde
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com
Share:

Contact Us

Name

Email *

Message *

Blog Archive

Blog Archive

Popular posts