function [f,dfdx,dfdy] = rotsin(x,y) f = x - sin(3.*y); dfdx = 1; dfdy = - 3 .* cos(3 .* y);