Receiving Errors On Matrix Dimensions
Mostrar comentarios más antiguos
Hello, I am unsure if I am making a simple mistake but I am receiving errors for matrix size within my equation code. Here is the code:
for
Z = 0.1
W_n = 2.5;
B = sqrt(1 - Z^2);
Theta = atan(B/Z);
c(t) = 1 - (1/B) * exp(1) .^ -(Z * W_n * t) * sin(B * W_n * t + Theta);
end
I am receiving these error messages:
Error using * Inner matrix dimensions must agree.
Error in FeedbackControlSystem (line 65) c(t) = 1 - (1/B) * exp(1) .^ -(Z * W_n * t) * sin(B * W_n * t + Theta);
Error using ^ One argument must be a square matrix and the other must be a scalar. Use POWER (.^) for elementwise power.
Error in FeedbackControlSystem (line 65) c(t) = 1 - (1/B) * exp(1)^-(Z * W_n * t) * sin(B * W_n * t + Theta);
Any help would be greatly appreciated. Thank you!
7 comentarios
KSSV
el 18 de Abr. de 2018
What is t here?
Veera Kanmani
el 18 de Abr. de 2018
c(t) = 1 - (1/B) * exp(1) .^ -(Z * W_n * t) * sin(B * W_n * t + Theta);.. i think the problem occurs, can you specify code in detail manner and what is t value ?
Jacob Hammer
el 24 de Abr. de 2018
Jacob Hammer
el 24 de Abr. de 2018
Jacob Hammer
el 24 de Abr. de 2018
Jacob Hammer
el 24 de Abr. de 2018
Jacob Hammer
el 24 de Abr. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices 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!.png)
.png)
.png)
