scp

From DavinciWiki
Jump to: navigation, search


Description

Computes the sums of cross products matrix for the input data

Arguments and Return Values

Arguments: A numeric array and an axis

Return Value: A numeric array

Usage

Syntax: scp(obj = VAL [, axis = x/y/z])

The scp() function computes the sums of cross products matrix for the vectors specified in the 'obj' cube.

The 'axis' parameter specifies the dimension along with the vectors are laid out. Say, the input 'obj' is an [m x n x w] matrix and the 'axis' has been specified as 'z' then:

'w' is the dimension of the a single input vector, and there are 'm x n' of them in the image cube. The default value for this parameter is 'z'.

Examples

Assume that 'data' is a data cube of dimensions [3x4x5], then the following line will compute the sums of cross products matrix 'c' for the 3x5=15 input vectors of dimension=4 each.

dv> data
3x4x5 array of float, bsq format [240 bytes]
0.764590        0.611329        0.013531
0.894059        0.853739        0.578765
0.210376        0.585063        0.310158
0.279368        0.174577        0.936107

0.299370        0.447376        0.990550
0.007483        0.579038        0.938315
0.112534        0.170555        0.685896
0.313794        0.501421        0.839884

0.919598        0.376773        0.673389
0.399142        0.126340        0.102502
0.694103        0.332728        0.768704
0.227432        0.069890        0.056398

0.270462        0.698306        0.015827
0.853593        0.178197        0.259137
0.603909        0.502429        0.583360
0.630653        0.586797        0.532714

0.312378        0.183963        0.169128
0.822097        0.197663        0.349818
0.964631        0.242891        0.883598
0.561978        0.779694        0.951827

dv> c = scp(data,y)
4x4x1 array of float, bsq format [64 bytes]
4.39159 3.59948 3.61228 2.82539
3.59948 4.92955 3.91447 3.85677
3.61228 3.91447 4.90606 3.93159
2.82539 3.85677 3.93159 4.95546

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left


Recent Core Changes

Modified On: 03-27-2006

Personal tools