DADiSP Worksheet Functions > Function Categories > Generated Series > PEAKS

 

PEAKS

Purpose:

Generates a Gaussian function of two variables, z = f(x, y).

Syntax:

PEAKS(n)

PEAKS(x, y)

n

-

Optional. An integer, the n x n output array size.

x

-

Optional. A real, the X value.

y

-

Optional. A real, the Y value.

Returns:

peaks(n)

 

returns an array.

 

peaks(x, y)

 

returns a scalar.

Example:

W1: peaks()

W2: peaks(20)

 

W1 contains the default 49 x 49 surface.

W2 contains a 20 x 20 surface.

 

image\peakspic.gif

Example:

peaks(1, 1)

 

returns 2.433789, the value of Z at X = 1.0, Y = 1.0

Remarks:

Peaks generates a Z surface of scaled and translated Gaussians.

The function of X and Y is :

 

image\peaks01.gif

 

where the default X and Y range is -3..(1/8)..3

See Also:

FXYVALS