最速下降法Matlab程序.docVIP

  • 79
  • 0
  • 约4.32千字
  • 约 4页
  • 2018-12-10 发布于江西
  • 举报
最速下降法Matlab程序

%最速下降梯度法matlab程序 % Steepest Descent Method % By Kshitij Deshpande clc clear all warning off prompt = {\Coeficients if X1=\,\Coefficients of X2=\,\Coefficeint of X1X2=\,\Initial Point=\}; def = {\[2 1 0]\,\[1 -1 0]\,\2\,\[0 0]\}; a=inputdlg(prompt,\Data\,1,def); a=char(a); [m,n]=size(a); x1 = eval(a(1,1:n));x2=eval(a(2,1:n));x1x2=eval(a(3,1:n));X1=eval(a(4,1:n)); delf1(1) = polyval(polyder(x1),X1(1)); delf1(1) = (delf1(1))+(x1x2*X1(2)); delf1(2) = polyval(polyder(x2),X1(1)); delf1(2) = (delf1(2))+(x1x2*X1(1)); s=-delf1; %%%%%%%%%% %report srep(1,1:2)=s; %%%%%%%%%% x1new(1)=s(1)^2;x1new(2)

文档评论(0)

1亿VIP精品文档

相关文档