# gaussCurve: Compute a Gaussian Curve In SpecHelpers: Spectroscopy Related Utilities

## Description

Computes the y values describing a Gaussian distribution given a range of x values and parameters for mu, sigma, and area. A tail may be introduced into the curve to simulate the behavior of some chromatography peaks.

## Usage

 `1` ```gaussCurve(x, area, mu, sigma, tail) ```

## Arguments

 `x` A vector of x values which will be used to compute the corresponding y values. Use enough to give good resolution. `area` The area of the peak, in arbitrary units. `mu` The position of the peak. Must fall in the range of x, of course. `sigma` The standard deviation of the peak. `tail` A value describing any tailing desired. If NA, no tailing is applied.

## Value

A vector of y values corresponding to the x values supplied.

## Author(s)

Bryan A. Hanson, DePauw University. hanson@depauw.edu

`lorentzCurve`, `makeSpec` which uses this function to make either spectra or chromatograms.
 ``` 1 2 3 4 5 6 7 8 9 10``` ```### A pure Gaussian curve myx <- seq(0, 100, length.out = 1000) # use lots of point for resolution myy <- gaussCurve(x = myx, area = 1, mu = 40, sigma = 1.5, tail = NA) plot(myx, myy, type = "l", main = "Pure Gaussian Curve") ### Now with tailing myy2 <- gaussCurve(x = myx, area = 1, mu = 40, sigma = 1.5, tail = 0.1) plot(myx, myy2, type = "l", main = "Gaussian Curve with Tailing") ```