y=e.^(-2*time)*[24*cos(4*time)-40*sin(4*time)]
Mostrar comentarios más antiguos
error using *, inner matrix dimensions must agree, could you correct for errors??
Respuestas (1)
James Tursa
el 15 de Sept. de 2015
Editada: James Tursa
el 15 de Sept. de 2015
0 votos
Try this:
y=e.^(-2*time).*[24*cos(4*time)-40*sin(4*time)] % <-- changed )*[ to ).*[
1 comentario
Walter Roberson
el 15 de Sept. de 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)
Categorías
Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!