function zout = w1curve1(t,deriv) 
%
%  macm 202 -- 27 dec 02 -- djm
%
%  w1curve1.m:  complex curve demo function, z(t) & z'(t)
%  - use elementwise arithmetic
%  - multi-purpose:  deriv = 0/1 for funct/deriv

switch deriv
    case(0)   % complex function, z(t)
        zr = 1 + sin(3.5*pi*t);
        zi = 1 - cos(2.5*pi*t);

        zout = zr + i*zi;    
    case(1)   %  derivative, z'(t)
        zr = (3.5*pi)*cos(3.5*pi*t);
        zi = (2.5*pi)*sin(2.5*pi*t);

        zout = zr + i*zi;
end 

return