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()

 

peaks01.png

W1 generates the default 49x49 peaks surface.

Example:

W2: peaks(20)

 

W2 generates a less dense a 20 x 20 surface.

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. The surface is shaded with the PARULINE colormap.

See Also:

FXYVALS

PARULINE

SHADEWITH