%% Function A4PotField_user
%  Function takes in arguments pos, and goal, being position and goal
%  point, respectively. It returns a column vector denoting desired heading
%  of the robot.
% NOTE: for use in CircularWorkspace.ut2
function desvH = PotField_user(pos,goal,bob) %#ok<FNDEF>


% Here you will calculate the gradient vector using a discrete gradient.
% Use of a helper function to get a value for potential at any point is
% recomended, as it simplifies code.

% A good idea is to code a system to visualize 


end


%% getPotential
%  Takes in position and goal points, and returns a value denoting the
%  magnitude of the potential field at that point. 
%  NOTE: the given obstacle vectors are for map CircularWorkspace.ut2
function val = getPotential(x,goal)
% contains column vectors of [x;y;r] for each obstacle in the workspace.
% The first obstacle is the border.
obst = [ 0 0 8;0 3.4 1;-3.4 0 1;2.4 -2.6 1.5]';


% Here you should calculate potential at point x.


end