function show_field(position)


close all; % Close all figures to start from a clean sheet

x = -2:0.3:2;  % Create a grid in x and y of step 0.05 (5cm)
y = -2:0.3:2;
[xx,yy] = meshgrid(x,y); % Create all the points of coordinates (x,y) in an array
% Calculate the associate potential (V = q/(4*pi*epislon*r)
V = xx.*exp(-xx.^2-yy.^2);
[ex,ey] = gradient(-V,.3,.3); % Calculates the electric field
figure(1);
quiver(x,y,ex,ey,2); %Show the field with arrows for its direction
xlabel('x');ylabel('y'); % Label the axis
title('2-D vector field: {\bf E}'); %label the figure

