如何用matlab画波形图

y=2cos2πt与y=4cos(2πt+π/3) 的合成图
2025-04-09 06:09:39
推荐回答(2个)
回答1:

t=0:0.1:5;
plot(t,2.*cos(2.*pi.*t));
grid;

plot(t,4.*cos(2.*pi.*t+pi./3));
grid;

plot(t,(4.*cos(2.*pi.*t+pi./3)+2.*cos(2.*pi.*t)));
grid;

迈特莱博

回答2:

(4)>> syms t;

>> f=cos(pi*t)*[heaviside(t-1)-heaviside(t-2)];

>> ezplot(f)

(5)>> syms t;

>> f=exp(-t)*heaviside(cos(t));

>> ezplot(f)