a=2; del=a/10; [X,Y]=meshgrid(0:del:a,0:del:a) sin(X) V=200*sin(X).*cos(Y) contourf(X,Y,V) %surf(X,Y,V) [Ex,Ey]=gradient(-V,del,del) Eabs=sqrt(Ex.^2+Ey.^2) figure, surf(X,Y,Eabs)