⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsk519.m

📁 matlab fsk 仿真
💻 M
字号:


% M = 4; 
% freqsep = 8; 
% nsamp = 8; 
% Fs = 32;
% row = 1000;
% x = randint(row,1,M); % Random signal
% y = fskmod(x,M,freqsep,nsamp,Fs); % Modulate.
% ly = length(y);
% % Create an FFT plot.
% % freq = [-Fs/2 : Fs/ly : Fs/2 - Fs/ly];
% % Syy = 10*log10(fftshift(abs(fft(y))));
% % plot(freq,Syy)
% plot(x,y)


clear all; 

x=randn(10,1)>0; 

fl=5000;fh=8000;fs=100000; 

ts=1/200;%码元速率200波特 

tt=(0:1/fs:ts); 

t=[tt;tt+ts;tt+2*ts;tt+3*ts;tt+4*ts;tt+5*ts;tt+6*ts;tt+7*ts;tt+8*ts;tt+9*ts]; 

y=zeros(10,length(tt)); 

i=1; 

%对该输入信号FSK调制 

while i<=10 

y(i,:)=x(i)*sin(2*pi*fh*t(i,:))+~x(i)*sin(2*pi*fl*t(i,:)); 

i=i+1; 

end 

t=reshape(t',length(tt)*10,1); 

y=reshape(y',length(tt)*10,1); 

subplot(211);plot(t,y); 

title('FSK信号的时域图形'); 

%该输入信号的频域图形 

n=length(y); 

r=fft(y)/n;r=fftshift(r); 

f=linspace(-fs/2,fs/2,n); 

subplot(212); 

plot(f,abs(r)); 

set(gca,'XTick',-fs/2:5000:fs/2); 

title('FSK信号的频谱图');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -