(正版)matlab阻尼牛顿法例题

上传人:哈**** 文档编号:137324458 上传时间:2020-07-07 格式:DOC 页数:1 大小:53.50KB
返回 下载 相关 举报
(正版)matlab阻尼牛顿法例题_第1页
第1页 / 共1页
亲,该文档总共1页,全部预览完了,如果喜欢就下载吧!
资源描述

《(正版)matlab阻尼牛顿法例题》由会员分享,可在线阅读,更多相关《(正版)matlab阻尼牛顿法例题(1页珍藏版)》请在金锄头文库上搜索。

1、Use damped Newton method to find the minimum of fx=x12+4x22+9x32-2x1+18x3.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 resu

2、lts.Matlab Codes: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

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号