You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: whirl.m
    path of file: ./repos/MRSignalsSeqs/Matlab
    
    the code of the file until where you have to start completion: %
%	function [g] = whirl(N,res,fov)
%
%	Function designs a WHIRL trajectory, as presented by J. Pipe.
%	WHIRL should be slightly faster than spiral and TWIRL, as the
%	maximum gradient amplitude is reached more quickly.  
%
%	INPUT:
%		N	=	# interleaves.
%		res	= 	resolution in cm (NOT mm).
%		fov	= 	field-of-view in cm.
%		dT	= 	Sampling time (default=.000004s)
%
%	OUTPUT:
%		g	= 	gradient waveform.
%
%
%
%	B. Hargreaves,	Oct 2002.
%

%	Note 1:
%		This is sensitive to dT, which bothers me.  Sampling
%		at higher rates, seems to work, so we use an oversampling
%		factor here of 8.

%	See James Pipe, MRM 42(4):714-720, October 1999.
    
function [g] = whirl(N,res,fov)
%
%	Function designs a WHIRL trajectory, as presented by J. Pipe.
%	WHIRL should be slightly faster than spiral and TWIRL, as the
%	maximum gradient amplitude is reached more quickly.  
%
%	INPUT:
%		N	=	# interleaves.
%		res	= 	resolution in cm (NOT mm).
%		fov	= 	field-of-view in cm.
%		dT	= 	Sampling time (default=.000004s)
%
%	OUTPUT:
%		g	= 	gradient waveform.
%
%
%
%	B. Hargreaves,	Oct 2002.
%

%	Note 1:
%		This is sensitive to dT, which bothers me.  Sampling
%		at higher rates, seems to work, so we use an oversampling
%		factor here of 8.

%	See James Pipe, MRM 42(4):714-720, October 1999.

%
%
% =============== CVS Log Messages ==========================
%	This file is maintained in CVS version control.
%
%	$Log: whirl.m,v $
%	Revision 1.2  2003/02/11 19:41:55  brian
%	Added a bunch of signal simulation files.
%	Not quite sure what the changes to other
%	files were here.
%	
%	Revision 1.1  2002/10/07 22:20:45  brian
%	WHIRL:  Winding Hybrid Interleaved Lines.
%	
%
% ===========================================================



function [g,g1,g2,g3] = whirl(N,res,fov,Ts)

if (nargin < 4)
	Ts=.000004;
end