Hi Everyone,I have a problem with subs command.Because when i tried to input it,it said Undefined variable "subs" or class subs".The Sigma V is supposed to be like this : SigmaV=p+q+V=0 , but mine : SigmaV='p+q+V=0' .The ' is not gone.
3 次查看(过去 30 天)
显示 更早的评论
syms x1 x2 L p q V
>> L=10;p=6;q=2;x1=2.5;x2=7.5;L=10;
>> SigmaV='p+q+V=0'
SigmaV =
'p+q+V=0'
>> SigmaV=subs{SigmaV,{'p,q'},{p,q}}
Undefined variable "subs" or class "subs".
The Command that i copied is from 2010a Mathlab.But i use 2019a Mathlab
0 个评论
回答(1 个)
Mr.Gh
2020-9-3
Hello,
You defined some variables as symbols. Then you change the type of the defined symbolic variables to "double"."subs" command is used to substitute variables into a symbolic expression. but, there is no symbolic expression!!
Check the documentation of the "subs" command.
https://www.mathworks.com/help/symbolic/subs.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!