y=e.^(-2*time)*[24*cos(4*time)-40*sin(4*time)]
Show older comments
error using *, inner matrix dimensions must agree, could you correct for errors??
Answers (1)
James Tursa
on 15 Sep 2015
Edited: James Tursa
on 15 Sep 2015
0 votes
Try this:
y=e.^(-2*time).*[24*cos(4*time)-40*sin(4*time)] % <-- changed )*[ to ).*[
1 Comment
Walter Roberson
on 15 Sep 2015
Right.
When you use [] then everything is sensitive to spacing. In particular if you had
[24*cos(4*time) -40*sin(4*time)]
then it could interpret that as being a two-element row vector, 24*cos(4*time) and -40*sin(4*time)
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!