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

  1. % function [indv,err] = getiv(mat)
  2. %
  3. %   Returns the INDEPENDENT VARIABLE values of the 
  4. %   VARYING matrix MAT. The INDEPENDENT VARIABLE is 
  5. %   returned as a column vector, and ERR = 0. If MAT 
  6. %   is not a VARYING matrix, then INDV is empty, 
  7. %   and ERR = 1.
  8. %     
  9. %   See also: INDVCMP, SORT, SORTIV, TACKON, XTRACT, and XTRACTI
  10.  
  11. function [indv,err] = getiv(mat)
  12.   if nargin <1
  13.     disp('usage: [indv,err] = getiv(mat)');
  14.     return
  15.   end
  16.   err = 0;
  17.   [type,rows,cols,num] = minfo(mat);
  18.   if type == 'vary'
  19.     indv = mat(1:num,cols+1);
  20.   else
  21.     indv = [];
  22.     err = 1;
  23.   end
  24. %
  25. % Copyright MUSYN INC 1991,  All Rights Reserved
  26.