home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 2.ddi / MUTOOLS1.DI$ / SIN_TR.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  594 b   |  23 lines

  1. % function out = sin_tr(freq,mag,tinc,lastt)
  2. %
  3. %   Generates a VARYING matrix containing a sine signal:
  4. %     FREQ  - frequency (radians/second)
  5. %     MAG   - magnitude of sine signal
  6. %     TINC  - time increment 
  7. %     LASTT - final time (note the signal starts at time t=0)
  8. %
  9. %   See also: COS_TR, SIGGEN, and STEP_TR.
  10.  
  11. function out = sin_tr(freq,mag,tinc,lastt)
  12.  
  13.  if nargin < 4
  14.    disp('usage: out = sin_tr(freq,mag,tinc,lastt)')
  15.    return
  16.  end
  17.  
  18.  tvec = 0:tinc:lastt;
  19.  y = mag*sin(freq*tvec);
  20.  out = vpck(y.',tvec.');
  21. %
  22. % Copyright MUSYN INC 1991,  All Rights Reserved
  23.