function h = PlotVector3(v,c,A);
% PlotVector(Vector,ColorString,AxisVector:[-m,m,-m,m])

% Make sure the input is as expected
if nargin < 2; c = '.r'; end;

if size(v,1) == 1 && size(v,2) == 2;
		v = v';
elseif size(v,2) ~= 1 && size(v,1) ~= 3;
		disp('Please enter a 3 x 1 vector');
		return;
end

% Plotting
hold on; 

% To plot just one vector, keep it simple
if min(size(v)) < 2; 

	% Set the axis
	if nargin < 3;
	m = max(v) + 2;
	axis([-m,m,-m,m,-m,m]);
	else
		axis(A);
	end
	
	
	% Plot the origin
	plot3(0,0,0,'r+',0,0,0,'ro','MarkerSize',20);

	% Plot the vector dot by dot
%	for t = 0:.01:1;
%		    u = t*v ;
%			plot(u(1),u(2),c,'MarkerSize',20)
%			drawnow;
%	   end   

	% Plot the vector immediately

		t = 0:.01:1; t = [t;t;t]
		v = repmat(v,1,length(t));
		u = t.*v ;

		% Plot the vector/arrow 
		h = plot3(u(1,:),u(2,:),u(3,:),c,'MarkerSize',20);
		

   
	

else
	
	% Copy the input matrix
	V = v;

	% Get in the right shape
	if size(v,1) ~= 2; v = v'; end;
	
	% Plot the origin
	plot(0,0,'r+',0,0,'ro','MarkerSize',20);

	% Plot each vector
	for i = 1:size(v,2)

		% Plot the 2nd vector in black
		if i > 1; c = '.k'; end
	
		% The current vector
		v = V(:,i);

		% Plotting Tricks
		m = max(v) + 2;
		t = 0:.01:1; t = [t;t];
		v = repmat(v,1,length(t));
		u = t.*v ;

		% Plot the vector/arrow 
		h(i) = plot(u(1,:),u(2,:),c,'MarkerSize',20);

		% Potentially change the axis
		if nargin > 2; 
				axis(A);
		else
				axis([-m,m,-m,m])
		end
	end

   end



