《matlab阻尼牛顿法例题(共2页).doc》由会员分享,可在线阅读,更多相关《matlab阻尼牛顿法例题(共2页).doc(2页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选优质文档-倾情为你奉上Use damped Newton method to find the minimum of .Select suitable initial point. Stopping error should not larger than = 0.01.Requirements:(1) Write Matlab codes to finish the algorithm (not use Matlab function directly).(2) Provide Matlab codes, the middle and the final results.Matlab C
2、odes:syms x1 x2 x3 n;x= x1,x2,x3;f=x12+4*x22+9*x32-2*x1+18*x3;g=2*x1-2,8*x2,18*x3+18;h=2,0,0;0,8,0;0,0,18;h0=inv(h);eps=0.01;k=0;tol=1;x0=0,0,0;while tolepsg0=subs(g,x,x0);m=eval(norm(g0);if m0 n=n0; end; end;end; x0=x0+n*d0; tol=m; k=k+1endResult:k=0 g0 =-2 m =18.11080 18 k =1 g0 =0 m=0 fmin =-10 x = 1 0 00 -1专心-专注-专业