|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
function maxtrans = transmissibility_zk(zk)
m1=260.8;
m2=14.5;
k1=334259;
z1 =0.03;
c1=2*sqrt(m1*k1)*z1;
z2=zk(1);
k2=zk(2);
c2=2*sqrt(k2*m2)*z2;
w1=0.5*2*pi;
w2=10*2*pi;
w = w1:(w2-w1)/500:w2;
T =( (c1*j*w + k1) .* (m2*(j*w).*2 + c2*j*w + k2) ) ./...
( (m1*(j*w).^2 +( c1 +c2 )*j*w +k1 + k2).*(m2*(j*w).^2 + c2*j*w +k2) - ( c2*j*w + k2).^2 );
% figure
% plot(w,abs(T))
% figure
% plot(w,angle(T)*180/pi)
maxtrans=max(abs(T));
这个是目标函数
以下是调用语句
[x,fval,exitflag,output,lambda,grad,hessian]=fmincon(@transmissibility_zk,[0.1,13865],[ ],[ ],[ ],[ ],[0.1,10000],[0.7,100000])
结果没有得到要求的目标值,
只迭代了6次就退出了
Optimization terminated: magnitude of directional derivative in search
direction less than 2*options.TolFun and maximum constraint violation
is less than options.TolCon.
No active inequalities.
x =
1.0e+004 *
0.000036464769068 1.386498505477171
fval =
11.592576914326367
exitflag =
5
output =
iterations: 6
funcCount: 23
lssteplength: 1
stepsize: 0.001372954668234
algorithm: 'medium-scale: SQP, Quasi-Newton, line-search'
firstorderopt: 9.591579437255859e-004
message: [1x172 char]
lambda =
lower: [2x1 double]
upper: [2x1 double]
eqlin: [0x1 double]
eqnonlin: [0x1 double]
ineqlin: [0x1 double]
ineqnonlin: [0x1 double]
grad =
1.0e-003 *
0.959157943725586
0.537485388391948
hessian =
18.401867691914799 -0.004367311374674
-0.004367311374674 0.999885314836522 |
|