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

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by