Welcome to the L3 Harris Geospatial documentation center. Here you will find reference guides and help documents.
﻿

CROSSPN

CROSSPN

## Author

Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov

## Purpose

A version of CROSSP for efficient vector cross products

## Calling Sequence

C = CROSSPN(A, B)

## Description

The function CROSSPN computes the vector cross product (outer
product). The difference between CROSSPN and the IDL library
function CROSSP, is that CROSSPN allows more than one cross
product to be computed at one time (i.e., it is vectorized).
Thus, in the expression "C = CROSSPN(A, B)" the vector cross
product is computed as C = A x B. Because CROSSPN is vectorized,
any of the following combinations are valid:
* A is a 3-vector, B is a 3-vector
==> C is the vector cross product C = A x B
* A is a 3xN array, B is a 3-vector
==> C(*,I) = A(*,I) x B (each A is crossed with B)
* A is a 3-vector, B is a 3xN array
==> C(*,I) = A x B(*,I) (A is crossed with each B)
* A is a 3xN array, B is a 3xN array
==> C(*,I) = A(*,I) x B(*,I) (component-by-component)
If both A and B are arrays then they must have the same
dimensions.

## Inputs

A - a 3-vector or 3xN array.
B - a 3-vector or 3xN array.

## Returns

The vector cross product A x B, either a 3-vector or a 3xN array
depending on A and B.

CROSSP

## Modification History

Written, CM, 10 Mar 2002
Documented, CM, 22 Mar 2002
\$Id: crosspn.pro,v 1.2 2002/03/22 22:02:02 craigm Exp \$

© 2019 Harris Geospatial Solutions, Inc. |  Legal