Advertisement
riabcis

Untitled

Mar 28th, 2018
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. function g=gradient1(x)
  2. % partial derivative in respect of x(1)
  3. g(1)=pi*sin(2*pi*x(1))*exp(0.5*cos(2*pi*x(1))+0.5*cos(2*pi*x(2)))+2*x(1)*exp(-0.2*(0.5*(x(1)^2+x(2)^2)).^(1/2))/(0.5*(x(1)^2+x(2)^2));
  4. % partial derivative in respect of x(2)
  5. g(2)=pi*sin(2*pi*x(2))*exp(0.5*cos(2*pi*x(1))+0.5*cos(2*pi*x(2)))+2*x(2)*exp(-0.2*(0.5*(x(1)^2+x(2)^2))^(1/2))/(0.5*(x(1)^2+x(2)^2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement