0001 function [ref] = legSignalModel( N, spec ) 0002 period = spec(1); 0003 phase = spec(2); 0004 amp = spec(3:end) / sign(spec(3)); 0005 th = (1+[0:length(amp)-1]*2).' * linspace( 0, 2*pi*N/period, N ) + phase; 0006 ref = amp * sin(th); 0007 return