function [q_out] = q_triangle( t )
nt = max( size(t,1), size(t,2) );
qout = zeros( nt, 1 );
for i = 1:nt
	if( t(i) < 0 )
   	q_out(i) = 0;
	elseif( t(i) < 0.6 )
	   q_out(i) = t(i);
	elseif( t(i) < 1.2)
	   q_out(i) = 1.2 -  t(i) ;
	else
   	q_out(i) = 0.;
   end
end

