?? pm.m
字號:
close all,clear;
kp=1;
t=-10:0.01:10;
x=cos(0.5*pi*t);
x1=sin(0.5*pi*t)/0.5;
c=cos(2*pi*t+x1);
subplot(221)
plot(t,x)
axis([-6,6,-1.2,1.2])
title('The modulating signal x(t)')
grid on;
subplot(222)
plot(t,c)
axis([-6,6,-1.2,1.2])
title('The modulated carrier c(t)')
grid on;
%=========================================================================
W1=4*pi; %確定信號的頻率范圍
N=512;
k=-N:N; %對信號的角頻率進行采樣的點數為2N+1點
W=k*W1/N; %計算頻率的采樣間隔
X=c*exp(-j*t'*W)*0.01; %進行傅里葉數值積分運算(矩陣運算)
X1=abs(X); %求模——幅度譜
phi=57.3*angle(X); %求相位譜
%==========================================================================
subplot(212);plot(W/(2*pi),X1);grid on;
axis([-W1/(2*pi),W1/(2*pi),-0.3*max(X1),1.1*max(X1)])
title('The magnitude spectra ');
xlabel('w*2pi (radians/s)');
%===========================================================================
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -