function s=drawTriangle(x,y,L)
% DRAWTRIANGLE draws an equilateral triangle
% at (x,y) with the length L
% Usage: s=drawTriangle(x,y,L)

% Copyright(C) 2002 Tohru Ikeguchi, All Rights Reserved

% Default value setting
if nargin<1,x=0; end
if nargin<2,y=0; end
if nargin<3,L=1; end

% Draw an equilateral triangle
s=fill([x x+L x+L/2 x],[y y y+sqrt(3)/2*L y],'k');
