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

📄 fsktiaozhi1.m

📁 这是一个FSK ASK 升余弦的的调制程序
💻 M
字号:
function  fsktiaozhi(s,f0,f1)
t=0:2*pi/99:2*pi;
cp=[];mod=[];bit=[];
for n=1:length(s);
    if s(n)==0;
        cp1=ones(1,100);
        c=sin(f0*t);
        bit1=zeros(1,100);
    else s(n)==1;
        cp1=ones(1,100);
        c=sin(f1*t);
        bit1=ones(1,100);
    end
    cp=[cp cp1];
    mod=[mod c];
    bit=[bit bit1];
end
fsk=cp.*mod;
subplot(3,1,1);
plot(bit,'LineWidth',1.5);grid on;
ylabel('Binary Signal');
axis([0 100*length(s) -2.5 2.5]);
subplot(3,1,2)
plot(fsk,'LineWidth',1.5);grid on;
ylabel('FSK modulation');
axis([0 100*length(s) -2.5 2.5]);
subplot(3,1,3)
M=2;freqset=1;nsamp=2;Fs=4;
z=dmod(s,freqset,nsamp,Fs,());
lz=length(z);
freq=[-Fs/2:Fs/lz:Fs/2:-Fs/lz];
Szz=10*log10(fftshift(abs(fft(z))));
plot(freq,Szz)

⌨️ 快捷键说明

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