| 2.1.24.4.51 ocmath_z_minmax
 DescriptionFind indices to min/max values of the phase of the complex and also to return the number of missing values in the given range.
 Syntaxuint ocmath_z_minmax( const d_complex * pData, uint i1, uint i2, uint * pnmin = NULL, uint * pnmax = NULL ) Parameters pData[input] pointer to vector data, i1[input] starting index to search for min max i2[input] ending index (inclusive) to search min max pnmin[output] index to the found min value location pnmax[output] index to the found max value location
 Returnnumber of missing values. If all values in range are missing values, then return (i2-i1+1). If none are missing values then returns 0
 ExamplesEX1
 void    ocmath_z_minmax_Ex1()
{
    vector<complex> v={1 +2i,2+2i,3+3i,4+4i,5+5i,2+2i,3+3i,4,15+2i,3,3,4,3,3};
    v[7].m_re= NANUM;
    
    uint     nMin,nMax;
    uint     nMissingValues=ocmath_z_minmax(v, 2, 14, &nMin, &nMax);
    printf("%d %d %d\n", nMissingValues, nMin, nMax);
    //nMissingValues=1    nMin=14 nMax=8             
}RemarkFind indices to min/max values of the phase of the complex and also to return the number of missing values in the given range
 pnmin and pnmax if supplied must point to buffer of GECE_SIZE, see oc_const.h for GECE_REAL to GECE_AMPL
 pData is considered missing values if either real or imaginary part is missing value (NANUM)
 See Alsoocmath_d_minmax, ocmath_f_minmax, ocmath_i_minmax, ocmath_b_minmax, ocmath_us_minmax
 Header to Includeorigin.h
 Reference |