Unrecognized variable Using solve command

5 vues (au cours des 30 derniers jours)
Sarah Alhabbas
Sarah Alhabbas le 11 Juin 2022
Commenté : Walter Roberson le 11 Juin 2022
It keeps giving “unrecognized function or variable ‘theta’

Réponses (1)

Star Strider
Star Strider le 11 Juin 2022
Perhaps:
syms theta
just after the ‘outputs’ comment would help.
Also MATLAB is case-sensitive, so change:
Angle = 10;
to:
angle = 10;
The vpa.function could also be helpful.
.
  1 commentaire
Walter Roberson
Walter Roberson le 11 Juin 2022
if theta is symbolic and angle is numeric then assignment to
Eq340(theta, angle)
would be an error.
I say that you should
syms theta angle
and change the Angle in Eq340 to angle
After that the last statement would become
theta = subs(S, angle, Angle)
Question: are you sure that you want to be working with 10 radians? It looks to me more likely that you should be using sind(angle) instead of sin(angle)

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by