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

📄 bfsk.m

📁 各种调制方式的matlab源码bask.m, bfsk.m, bpsk.m, msk.asv, msk.m, qpsk.m, raymodel.m
💻 M
字号:
clear;
clc;
b = input('Enter the Bit stream \n ');
%b = [0 1 0 1 1 1 0];
n = length(b);
t = 0:.01:n;
x = 1:1:(n+1)*100;

for i = 1:n
    if (b(i) == 0)
        b_p(i) = -1;
    else
        b_p(i) = 1;
    end
    for j = i:.1:i+1
        bw(x(i*100:(i+1)*100)) = b_p(i);        
    end
end

bw = bw(100:end);

wo = 2*(2*pi*t);
W  = 1*(2*pi*t);
sinHt = sin(wo+W);
sinLt = sin(wo-W);

st = sin(wo+(bw).*W);


subplot(4,1,1)
plot(t,bw)
grid on ; axis([0 n -2 +2])
subplot(4,1,2)
plot(t,sinHt)
grid on ; axis([0 n -2 +2])
subplot(4,1,3)
plot(t,sinLt)
grid on ; axis([0 n -2 +2])
subplot(4,1,4)
plot(t,st)
grid on ; axis([0 n -2 +2])

Fs=1;
figure
%pburg(st,10)
periodogram(st) 

⌨️ 快捷键说明

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