matlab毕业编程【谷速软件】多变量函数的最速下降法.docVIP

  • 10
  • 0
  • 约2.13千字
  • 约 3页
  • 2020-04-29 发布于河北
  • 举报

matlab毕业编程【谷速软件】多变量函数的最速下降法.doc

%Steepest Descent Method for Multiple Variable Functions clc; close all; clear all; format long; disp(Steepest Descent Method); disp(=============); %Starting points x01=-1; x02=0; %Function F in Symbolic Format a=-(3*x1+x2+6*x1*x2-2*(x1^2)+2*(x2^2)); %Insert the desired magnitude of final direction vector (0.0001 is fine) eserror=0.0001; %Leave the rest unchanged %================================= syms x1 x2 % Hessian Of F disp( sprintf(Function = %s, a)); A=[diff(diff(a,x1),x1),diff(diff(a,x1),x2);... diff(diff(a,x2),x1),diff(diff(a,x2),x2)]; %First Order Derivative of F B=[diff(a,x1);d

文档评论(0)

1亿VIP精品文档

相关文档