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

 채택된 답변

cosas
cosas 2022년 11월 19일

0 개 추천

这很有意思,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)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB 快速入门에 대해 자세히 알아보기

태그

질문:

2022년 11월 19일

답변:

2022년 11월 19일

Community Treasure Hunt

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

Start Hunting!