Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function g=gradient1(x)
- % partial derivative in respect of x(1)
- 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));
- % partial derivative in respect of x(2)
- 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