Filter löschen
Filter löschen

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.

2 Ansichten (letzte 30 Tage)
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

Antworten (1)

Mr.Gh
Mr.Gh am 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

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by