在matlab中由几个函数组合在一起形成一个单变量函数怎么.。
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
kiseped
le 22 Nov 2022
如果你的 f 没有单独写成 m 文件,而是直接在脚本中写的 f = @(x)。。。。,那么,调用的时候应该是:
fsolve(f,1,optimset('display','off'))
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!