function output=arrow(a,b,c)
% arrow draws an arrow

%   Project: IMPACT
%   Title of Code: arrow
%   Relevant additional documentation:
%   Developer: Carlos Gonzalez
%   External Dependencies: NA
%
%   Disclaimer
%   CAUTION: It is strongly recommended that changes to this code
%   should be avoided without first consulting with authors.


% The arrow function
% (a,b) is the coordinate the point, c is the direction
% c=1 : right
% c=2 : up
% c=3 : left
% c=4 : down
rx=1; ry=23.07; sca=3;
switch c
    case 1
        output=patch([a-rx a a-rx],[b-ry/sca b b+ry/sca],[0 0 0]);
    case 2
        output=patch([a-rx/sca a a+rx/sca],[b-ry b b-ry],[0 0 0]);
    case 3
        output=patch([a+rx a a+rx],[b-ry/sca b b+ry/sca],[0 0 0]);
    case 4
        output=patch([a-rx/sca a a+rx/sca],[b+ry b b+ry],[0 0 0]);
end