psi(1.7)=0.2085
但是s=solve('psi(10*x)-0.2085=0','x')求出来的结果不是1.7 是为什么

 Akzeptierte Antwort

cosas
cosas am 19 Nov. 2022

0 Stimmen

这很有意思,psi应该是不接受负数作参数的吧?
用s=solve('psi(10*x)-0.2085=0','x')可以算出来
s =
-226.98740242646891529702242417634
但是psi(10*(-226.98740242646891529702242417634))会报错
而psi(10*s)却能算出来
不知道这是不是matlab的一个bug
另外,你可以试试fzero求解,这个没问题:y=@(x)psi(10*x)-0.2085;
fzero(y,1)

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB 快速入门 finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 19 Nov. 2022

Beantwortet:

am 19 Nov. 2022

Community Treasure Hunt

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

Start Hunting!