?? 1.m
字號:
fs=2000000;
t=(0:1/fs:0.1);
xw=randn(1,length(t));
q=max(xw);
p=min(xw);
%psd(xw,8192);
%xlabel('normalised frequency')
%ylabel('PSD of xw (dB)')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
c1=fir1(1023,1/100);
%psd(c1,8192);
x=filter(c1,1,xw);
%psd(x,8192);
%xlabel('normalised frequency')
%ylabel('PSD of x(t) (dB)')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fc=250000;
v=cos(2*pi*fc*t);
y=x.*v;
%psd(y,8192);
%xlabel('normalised frequency')
%ylabel('PSD of y(t) (dB)')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%c=[0 1 0];
%y1=filter(c,1,y);
%%%%%%%%%%%%%%%%%%%%%%%%%%%
u=y.*v;
c2=fir1(23,1/100);
%hd = dfilt.dffir(c2)
%freqz(c2);
%plot(w,H)
%psd(c2,8192);
%fvtool(c2);
%hold on
%psd(u,8192);
xx=2*filter(c2,1,u);
%psd(xx,8192);
%figure(2)
%plot(t(1:100),x(1:100));
%hold on
%plot(t(1:100),xx(12:111),'r');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FM Modulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
deltaf=1;
z=sin(2*pi*(fc+deltaf*x).*t);
psd(z,8192)
hold on
psd(y,8192)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Digital Modulation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -