MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 请教subs函数的问题 (https://www.labfans.com/bbs/showthread.php?t=9479)

bayes310 2009-08-18 17:07

请教subs函数的问题
 
subs函数的定义为subs(S,old,new) replaces old with new in the symbolic expression S
比如定义f=x-cos(x)
f1=subs(f,'pi',x)
f2=subs(f,x,'pi')
可是符号运算后f1与f2的结果同为pi+1,这是为什么呢?
谢谢

gengyongnaruto 2009-08-25 09:03

回复: 请教subs函数的问题
 
我也是新手啊,抱着研究的心态把你的程序带进系统里进行计算。貌似结果不一样哈,
f1=subs(f,'pi',x)的结果和原来的方程是一模一样的,就是f=x-cos(x)。


所有时间均为北京时间。现在的时间是 12:30

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.