matrix dimensions incompatible problem.
显示 更早的评论
Hey, basic new guy question here, that I feel stupid even asking but I can't seem to find the answer or get my code to work. All I'm trying to do is define a time domain and then have matlab return an x value for each time increment in the time domain, according to a given formula:
t=linspace(0,3);
dampedx =(0.1*cos(10*t)+0.00025*sin(10*t))*exp(-0.0025*t);
The trig function part works, but it is the "exp(-0.0025*t)" term it seems to have an issue with. I tried using "t." instead of "t" because I'm trying to tell it for each value of t, calculate a corresponding value of x, but I think it is trying to do something funky with the entire array of values in t, because it keeps giving me some error about matrix dimensions.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!