在matlab中由几个函数组合在一起形成一个单变量函数怎么.。
2 ビュー (過去 30 日間)
古いコメントを表示
clc
clear
syms D m Nx b a k
D=1;b=1;m=1;
a=1.7.*b
Nx=(k*pi^2*D)/b^2
af=((m^2*pi^2)/a^2+((Nx*m^2*pi^2)/(D*a^2))^0.5)^0.5;
bt=(-(m^2*pi^2)/a^2+((Nx*m^2*pi^2)/(D*a^2))^0.5)^0.5;
t=bt^2+(0.25*m^2*pi^2)/a^2
s=af^2-(0.25*m^2*pi^2)/a^2
f=2*t*s+(s^2+t^2)*cos(bt*b)*cosh(af*b)-(1/(af*bt))*(af^2*t^2-bt^2*s^2)*sin(bt*b)*sinh(af*b)
f1=inline('f','k')
k1=fsolve(f1,1,optimset('display','off'))
我像这边编为什么不出答案
0 件のコメント
採用された回答
kiseped
2022 年 11 月 22 日
如果你的 f 没有单独写成 m 文件,而是直接在脚本中写的 f = @(x)。。。。,那么,调用的时候应该是:
fsolve(f,1,optimset('display','off'))
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!