home *** CD-ROM | disk | FTP | other *** search
- % addgaussian amplitude center widthFWHM
-
- % Add a gaussian to the y vector
-
- % ARGUMENTS:
- % amplitude -- amplitude of the Gaussian
- % center -- center of Gaussian (in x)
- % widthFWHM -- full width at 1/2 maximum
- %
- % DESCRIPTION:
- % Add a Gaussian function to the current y values. Use a negative
- % amplitude to subtract a Gaussian.
-
- % Note: This script could also be a macro since
- % it takes only 1 line
-
- rpn <x &2 - &3 2 ln sqrt 2 * / / dup * -1 * e^x &1 * <y + >y