You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
267 B

11 months ago
function f=fun(x,y,z,a,b,c)
% k=1e2;
k=20;
tmp = (c + cos(2*pi.*x) + a.*cos(2*pi.*y) + b.*cos(2*pi.*z));
tmp2 = exp(k.*tmp);
% dHda = -(k.*tmp2.*cos(2*pi.*y))./(tmp2+ 1).^2;
% dHdb = -(k.*tmp2.*cos(2*pi.*z))./(tmp2+ 1).^2;
dHdc = -(k.*tmp2)./(tmp2+ 1).^2;
f=dHdc;
end