home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 3.ddi / DEMOS.DI$ / HUMPS.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  312 b   |  10 lines

  1. function y = humps(x)
  2. %HUMPS    A function used by QUADDEMO, ZERODEMO and FPLOTDEMO.
  3. %    HUMPS(X) is a function with strong maxima near x = .3 and x = .9.
  4. %    See QUADDEMO, ZERODEMO and FPLOTDEMO.
  5.  
  6. %       Copyright (c) 1984-93 by The MathWorks, Inc.
  7.  
  8. y = 1 ./ ((x-.3).^2 + .01) + 1 ./ ((x-.9).^2 + .04) - 6;
  9.  
  10.