2016年5月25日 星期三
FM頻率震福
clc
n=0:100;
A=20;
x=A*cos(2*pi*10^8*n+20*sin(2*pi*10^8*n));
k = -100:100; w = (pi/100)*k;
X = x * (exp(-j*pi/100)).^(n'*k);
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('MagnitudePart'); ylabel('Magnitude')
subplot(2,2,3);plot(w/pi,angX);grid
xlabel('frequency in pi units');
title('Angle Part'); ylabel('Radians')
subplot(2,2,2);plot(w/pi,realX);grid
xlabel('frequency in pi units');title('Real Part'); ylabel('Real')
subplot(2,2,4);plot(w/pi,imagX);grid
xlabel('frequency in pi units');
title('Imaginary Part'); ylabel('Imaginary')
2016年5月5日 星期四
matlab2
clc
n=0:100;
x=cos(pi*n/2);
k = -100:100; w = (pi/100)*k;
X = x * (exp(-j*pi/100)).^(n'*k);
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('MagnitudePart'); ylabel('Magnitude')
subplot(2,2,3);plot(w/pi,angX);grid
xlabel('frequency in pi units');
title('Angle Part'); ylabel('Radians')
subplot(2,2,2);plot(w/pi,realX);grid
xlabel('frequency in pi units');title('Real Part'); ylabel('Real')
subplot(2,2,4);plot(w/pi,imagX);grid
xlabel('frequency in pi units');
title('Imaginary Part'); ylabel('Imaginary')
n=0:100;
x=cos(pi*n/2);
k = -100:100; w = (pi/100)*k;
X = x * (exp(-j*pi/100)).^(n'*k);
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('MagnitudePart'); ylabel('Magnitude')
subplot(2,2,3);plot(w/pi,angX);grid
xlabel('frequency in pi units');
title('Angle Part'); ylabel('Radians')
subplot(2,2,2);plot(w/pi,realX);grid
xlabel('frequency in pi units');title('Real Part'); ylabel('Real')
subplot(2,2,4);plot(w/pi,imagX);grid
xlabel('frequency in pi units');
title('Imaginary Part'); ylabel('Imaginary')
2016年5月4日 星期三
matlab1
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('MagnitudePart'); ylabel('Magnitude')
subplot(2,2,3);plot(w/pi,angX);grid
xlabel('frequency in pi units');
title('Angle Part'); ylabel('Radians')
subplot(2,2,2);plot(w/pi,realX);grid
xlabel('frequency in pi units');title('Real Part'); ylabel('Real')
subplot(2,2,4);plot(w/pi,imagX);grid
xlabel('frequency in pi units');
title('Imaginary Part'); ylabel('Imaginary')
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('MagnitudePart'); ylabel('Magnitude')
subplot(2,2,3);plot(w/pi,angX);grid
xlabel('frequency in pi units');
title('Angle Part'); ylabel('Radians')
subplot(2,2,2);plot(w/pi,realX);grid
xlabel('frequency in pi units');title('Real Part'); ylabel('Real')
subplot(2,2,4);plot(w/pi,imagX);grid
xlabel('frequency in pi units');
title('Imaginary Part'); ylabel('Imaginary')
訂閱:
文章 (Atom)