ocmath_norm

 

Description

The general norm funtion is to compute largest singular value for vector.

Syntax

double ocmath_norm( double * pData, uint nSize )

Parameters

pData
[input] pointer to vector data
nSize
[input] the size of data

Return

The largest singular value in vector. But if nSize < 1, return NANUM

Examples

EX1

int ocmath_norm_ex1()
{
    vector x(10);
    x.Data(1,10);//Generate data
    UINT nSize = x.GetSize();//get the size of data
    double svd = ocmath_norm(x, nSize);
    printf("The largest svd is %g\n",svd);
    return 1;
}

Remark

See Also

ocmath_norm2

header to Include

origin.h

Reference