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.

5 views (last 30 days)
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

Answers (1)

Mr.Gh
Mr.Gh on 3 Sep 2020
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

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!