function [] = span(v1,v2)
% Emre Mengi
% Task : Plots the span of v1 and v2; each vector is 
%		 a column vector of size 2.

[n1,n2] = size(v1);

if n1 ~= 2 | n2 ~= 1
	error('v1 is a column vector of size 2');
end

[m1,m2] = size(v2);

if m1 ~= 2 | m2 ~= 1
	error('v2 is a column vector of size 2');
end

if norm(v1) > 10^-8
	v1 = v1/norm(v1);
else
	v1 = [0; 0];
end

if norm(v2) > 10^-8
	v2 = v2/norm(v2);
else
	v2 = [0; 0];
end

spanv1v2 = [];

incr = pi/400;
figure(1);
hold on;
for theta = 0:incr:(pi/2)
		vtempunit = cos(theta)*v1 + sin(theta)*v2;	
		plot([-10*vtempunit(1) 10*vtempunit(1)],[-10*vtempunit(2) 10*vtempunit(2)],'gx-');

		vtempunit = cos(theta)*v1 - sin(theta)*v2;	
		plot([-10*vtempunit(1) 10*vtempunit(1)],[-10*vtempunit(2) 10*vtempunit(2)],'gx-');
end

figure(1);
hold off;
return	