Unrecognized variable Using solve command
3 次查看(过去 30 天)
显示 更早的评论
It keeps giving “unrecognized function or variable ‘theta’
0 个评论
回答(1 个)
Star Strider
2022-6-11
Perhaps:
syms theta
just after the ‘outputs’ comment would help.
Also MATLAB is case-sensitive, so change:
Angle = 10;
to:
angle = 10;
.
1 个评论
Walter Roberson
2022-6-11
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!