# dim_product

For each index of dimensions 0..n-2, this function computes the product of the n-1 dimension.

## Synopsis

```	function dim_product(
x : numeric
)
```

## Arguments

x
An array of one or more numeric values of any dimensionality

## Description

The dim_product function computes the product of all elements of the n-1 dimension for each index of the dimensions 0..n-2. dim_product ignores missing values. The output dimensionality is the same as the first n-2 dimensions of the input.

## Example

The following is simplistic example that demonstrates how dim_product works. Try running this example and print out the values to get a better idea of dim_product.
```begin
;
; 	Create example array
;
a = onedtond(ispan(1,150,1),(/3,5,10/))
;
; 	Assign dimension names
;
a!0 = "x"
a!1 = "y"
a!2 = "z"
;
;  	Compute product of dimension z at all points x and y
;
pxy = dim_product(a)
;
;       Compute product of dimension x at all points y and z
;	The following uses Named Subscripting to reorder the input array
;	such that x is the n-1 dimension.
;
pyz = dim_product( a(y | :, z | : , x | :) )

end

```

### Reference Manual Control Panel

\$Revision: 1.5 \$ \$Date: 1998/06/15 21:29:07 \$