注册 登录
编程论坛 Matlab

我是新手,很多不懂,请多多指教,拜托大家了!

putaobaby 发布于 2006-05-11 20:27, 1082 次点击

想要得到f=2*cos(400*pi*t)*(cos(600*pi*t)+cos(800*pi*t))的时域波形图该怎么编阿?
拜托了!!!

2 回复
#2
haichuan2006-05-11 21:47

ts=0.001; //定义步长
t=[0:ts:10]; //定义时间序列或叫向量
f=2*cos(400*pi*t)*(cos(600*pi*t)+cos(800*pi*t))
plot(t,f); //画图

#3
putaobaby2006-05-13 19:18
可是会出现这样的error

??? Error using ==> *
Inner matrix dimensions must agree.

这是怎么回事啊?
1