squareask.m

来自「一些调幅信号的matlab仿真」· M 代码 · 共 23 行

M
23
字号
dt=0.001;N=5000;
t=0:dt:N*dt;
x=square(2*pi*t);
y=(x+1)/2;
subplot(211),plot(t,x);grid on;
fc=3;
ht=cos(2*pi*fc*t);
y_ask=y.*ht;
subplot(212),plot(t,y_ask);
grid on;title('2ASK');
fc1=4;
ht1=cos(2*pi*fc1*t+pi/2);
figure(2);
x_ask1=x.*ht1;
subplot(211),plot(t,x);grid on;
subplot(212),plot(t,x_ask1);
grid on;
title('2PSK');f1=1;
y=abs((x+1)/2);
x_2fsk=cos(2*pi*fc*t+6*pi*y.*t);
figure(3)
subplot(211),plot(t,x);grid on;
subplot(212),plot(t,x_2fsk);title('2fsk');

⌨️ 快捷键说明

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