已知信号f(t)的波形图如下图所示,使用MATLAB绘出满足下列要求的信号波形,即f(0.5t+1)

如题所述

代码有点乱,没细想,但能实现你的意思

clear all;clc;
clear all;clc;
t1=0:0.001:2;
t=0.5*t1+1;
ft1=2*(t1>0&t1<1)+2*(t1==1)+1*(t1>1&t1<2);
ft=2*(t1>=0&t1<1)+2*(t1==1)+(t1>1&t1<2);
x1=[0 1];y1=[2 2];
x=[1 3/2];y=[2 1];
figure(1);
plot(t1,ft1,'Linewidth',2);grid on;hold on
plot(x1,y1,'or','Linewidth',2,'Markersize',6,'MarkerFaceColor','w');
axis([0 2.5 0 2.5]);
figure(2);
plot(t,ft,'Linewidth',2);grid on;hold on
plot(x,y,'or','Linewidth',2,'Markersize',6,'MarkerFaceColor','w');
axis([0 2.5 0 2.5]);

原图

所求图

温馨提示:答案为网友推荐,仅供参考