
function pflag = plotVector(origin,vector,color)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Function to plot a vector as a line segment of
% specified color from a given origin
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

x(1) = origin(1) ; y(1) = origin(2) ; z(1) = origin(3) ;

x(2) = vector(1) ; y(2) = vector(2) ; z(2) = vector(3) ;

line(x,y,z,'Color',color,'LineWidth',4)

pflag=1 ;

