在matlab中由几​个函数组合在一起形成​一个单变量函数怎么.​。

조회 수: 2 (최근 30일)
logivel
logivel 2022년 11월 22일
답변: kiseped 2022년 11월 22일
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'))
我像这边编为什么不出答案

채택된 답변

kiseped
kiseped 2022년 11월 22일
如果你的 f 没有单独写成 m 文件,而是直接在脚本中写的 f = @(x)。。。。,那么,调用的时候应该是:
fsolve(f,1,optimset('display','off'))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 数学에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!