home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 5.ddi / SPLINES.DI$ / SUBPLUS.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  395 b   |  14 lines

  1. function y=subplus(x)
  2. % SUBPLUS    Positive part.
  3. %                              x , if  x>=0
  4. %     y = subplus(x) := (x)  =               ,
  5. %                          +   0 , if  x<=0
  6. %
  7. %  returns the positive part of  x . Used for computing truncated powers.
  8.  
  9. % C. de Boor / latest change: Nov.26, 88
  10. % Copyright (c) 1990-92 by Carl de Boor and The MathWorks, Inc.
  11.  
  12.  
  13. y=(x+abs(x))/2;
  14.