Error on if loop

4 visualizaciones (últimos 30 días)
Emily Gobreski
Emily Gobreski el 17 de Jun. de 2016
Comentada: Star Strider el 17 de Jun. de 2016
if 0<theta<180, x=C*A
else xx=CC*AA
end
Undefined function or variable 'A'.
Error in DynamicsProject (line 60)
if 0<theta<180, x=C*A

Respuesta aceptada

Star Strider
Star Strider el 17 de Jun. de 2016
It is asking you to define variable ‘A’.
That aside, the if condition should be defined as:
if (0 < theta) & (theta < 180)
There is not enough information presented to allow a more detailed Answer.
There’s quite likely a more efficient way to do what you want to do, if we have the necessary information to help you do it.
  4 comentarios
Emily Gobreski
Emily Gobreski el 17 de Jun. de 2016
It works! thank you so much!
Star Strider
Star Strider el 17 de Jun. de 2016
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Word games en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by