bask.m

来自「各种调制方式的matlab源码bask.m, bfsk.m, bpsk.m, m」· M 代码 · 共 30 行

M
30
字号
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
    for j = i:.1:i+1
        bw(x(i*100:(i+1)*100)) = b(i);        
    end
end

bw = bw(100:end);

sint = sin(2*pi*t);

st = bw.*sint;

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

⌨️ 快捷键说明

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