Ts = 1;
% tinc = The number of points every Ts seconds
tinc = 20;
dt = Ts/tinc;
t = 0:dt:16*Ts;
wc = 2*pi*5;
n = 4;
% Generating x(t), a staircase waveform that repeats every 4Ts seconds
x = zeros(length(t),1);
for (i = 1:1:n)
for (j = 1:1:n)
x = x + (2*i-5)*(u_step(t,(i-1)*Ts+(j-1)*4*Ts) - u_step(t,i*Ts+(j-1)*4*Ts));
end;
end;
x(length(t)) = x(length(t)-1);
x = x(:);
% Generating y(t)
t1 = 0.24*t;
y = zeros(length(t),1);
for (i = 1:1:n);
y = y + (2*i-5)*(u_step(t1,(i-1)*Ts) - u_step(t1,i*Ts));
end;
temp1 = cos(wc*t + pi/4);
temp2 = sin(wc*t + pi/4);
temp1 = temp1(:);
temp2 = temp2(:);
s = x.*temp1 - y.*temp2;
% Plotting x(t) versus y(t)
plot_pr(3);
axis([-4 4 -4 4]);
plot(x,y,'x');
xlabel('x(t)');
ylabel('y(t)');
axis;
pause;
% Plotting x(t) & y(t)
subplot(211)
plot(t,x);
xlabel('t');
ylabel('x(t)');
subplot(212);
plot(t,y);
xlabel('t');
ylabel('y(t)');
pause;
subplot(111);
plot(t,s);
xlabel('t');
ylabel('s(t)')
QAM.rar_MATLAB 实现qam_qaM MATLAB_qam matlab实现
版权申诉
68 浏览量
2022-09-19
14:25:03
上传
评论
收藏 817B RAR 举报
JonSco
- 粉丝: 67
- 资源: 1万+
最新资源
- Screenshot_20240430_144340_com.ss.android.ugc.live.jpg
- 回到山沟沟.mp3
- 111111111111111111
- 基于matlab实现关于语音信号声源定位DOA估计所用的一些传统算法.rar
- 基于ultralytics-yolov8, 将其检测/分类/分割/姿态等任务移植到rk3588上
- Screenshot_2024-04-30-21-47-24-26.jpg
- 基于matlab实现波束形成,包括线阵、平面阵和圆阵
- Python自动生成excel周期报告源码
- 基于matlab实现DOA 估计和自适应波束形成.rar
- 一个基于yolov8的火灾检测部署
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈