| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.9 Data information
There are a set of functions for obtaining data properties in MGL language. However most of them can be found using "suffixes". Suffix can get some numerical value of the data array (like its size, maximal or minimal value, the sum of elements and so on) as number. Later it can be used as usual number in command arguments. The suffixes start from point ‘.’ right after (without spaces) variable name or its sub-array. For example, a.nx give the x-size of data a, b(1).max give maximal value of second row of variable b, (c(:,0)^2).sum give the sum of squares of elements in the first column of c and so on.
- MGL command: info dat
- Method on
mglData:const char *PrintInfo ()const - Method on
mglData:voidPrintInfo (FILE *fp)const - Method on
mglDataC:const char *PrintInfo ()const - Method on
mglDataC:voidPrintInfo (FILE *fp)const - C function:
const char *mgl_data_info (HCDTdat) Gets or prints to file fp or as message (in MGL) information about the data (sizes, maximum/minimum, momentums and so on).
- MGL suffix: (dat) .nx
- MGL suffix: (dat) .ny
- MGL suffix: (dat) .nz
- Method on
mglData:longGetNx () - Method on
mglData:longGetNy () - Method on
mglData:longGetNz () - Method on
mglDataC:longGetNx () - Method on
mglDataC:longGetNy () - Method on
mglDataC:longGetNz () - C function:
longmgl_data_get_nx (HCDTdat) - C function:
longmgl_data_get_ny (HCDTdat) - C function:
longmgl_data_get_nz (HCDTdat) Gets the x-, y-, z-size of the data.
- MGL suffix: (dat) .max
- Method on
mglData:mrealMaximal ()const - Method on
mglDataC:mrealMaximal ()const - C function:
mrealmgl_data_max (HCDTdat) Gets maximal value of the data.
- MGL suffix: (dat) .min
- Method on
mglData:mrealMinimal ()const - Method on
mglDataC:mrealMinimal ()const - C function:
mrealmgl_data_min (HMDTdat)const Gets minimal value of the data.
- Method on
mglData:mrealMinimal (int&i,int&j,int&k)const - Method on
mglDataC:mrealMinimal (int&i,int&j,int&k)const - C function:
mrealmgl_data_min_int (HCDTdat,int*i,int*j,int*k) Gets position of minimum to variables i, j, k and returns the minimal value.
- Method on
mglData:mrealMaximal (int&i,int&j,int&k)const - Method on
mglDataC:mrealMaximal (int&i,int&j,int&k)const - C function:
mrealmgl_data_max_int (HCDTdat,int*i,int*j,int*k) Gets position of maximum to variables i, j, k and returns the maximal value.
- Method on
mglData:mrealMinimal (mreal&x,mreal&y,mreal&z)const - Method on
mglDataC:mrealMinimal (mreal&x,mreal&y,mreal&z)const - C function:
mrealmgl_data_min_real (HCDTdat,mreal*x,mreal*y,mreal*z) Gets approximated (interpolated) position of minimum to variables x, y, z and returns the minimal value.
- MGL suffix: (dat) .mx
- MGL suffix: (dat) .my
- MGL suffix: (dat) .mz
- Method on
mglData:mrealMaximal (mreal&x,mreal&y,mreal&z)const - Method on
mglDataC:mrealMaximal (mreal&x,mreal&y,mreal&z)const - C function:
mrealmgl_data_max_real (HCDTdat,mreal*x,mreal*y,mreal*z) Gets approximated (interpolated) position of maximum to variables x, y, z and returns the maximal value.
- MGL suffix: (dat) .sum
- MGL suffix: (dat) .ax
- MGL suffix: (dat) .ay
- MGL suffix: (dat) .az
- MGL suffix: (dat) .aa
- MGL suffix: (dat) .wx
- MGL suffix: (dat) .wy
- MGL suffix: (dat) .wz
- MGL suffix: (dat) .wa
- MGL suffix: (dat) .sx
- MGL suffix: (dat) .sy
- MGL suffix: (dat) .sz
- MGL suffix: (dat) .sa
- MGL suffix: (dat) .kx
- MGL suffix: (dat) .ky
- MGL suffix: (dat) .kz
- MGL suffix: (dat) .ka
- Method on
mglData:mrealMomentum (chardir,mreal&a,mreal&w)const - Method on
mglData:mrealMomentum (chardir,mreal&m,mreal&w,mreal&s,mreal&k)const - C function:
mrealmgl_data_momentum_val (HCDTdat,chardir,mreal*a,mreal*w,mreal*s,mreal*k) Gets zero-momentum (energy, I=\sum dat_i) and write first momentum (median, a = \sum \xi_i dat_i/I), second momentum (width, w^2 = \sum (\xi_i-a)^2 dat_i/I), third momentum (skewness, s = \sum (\xi_i-a)^3 dat_i/ I w^3) and fourth momentum (kurtosis, k = \sum (\xi_i-a)^4 dat_i / 3 I w^4) to variables. Here \xi is corresponding coordinate if dir is ‘'x'’, ‘'y'’ or ‘'z'’. Otherwise median is a = \sum dat_i/N, width is w^2 = \sum (dat_i-a)^2/N and so on.
- MGL suffix: (dat) .fst
- Method on
mglData:mrealFind (const char *cond,int&i,int&j,int&k)const - C function:
mrealmgl_data_first (HCDTdat,const char *cond,int*i,int*j,int*k) Find position (after specified in i, j, k) of first nonzero value of formula cond. Function return the data value at found position.
- MGL suffix: (dat) .lst
- Method on
mglData:mrealLast (const char *cond,int&i,int&j,int&k)const - C function:
mrealmgl_data_last (HCDTdat,const char *cond,int*i,int*j,int*k) Find position (before specified in i, j, k) of last nonzero value of formula cond. Function return the data value at found position.
- Method on
mglData:intFind (const char *cond,chardir,inti=0,intj=0,intk=0)const - C function:
mrealmgl_data_find (HCDTdat,const char *cond,inti,intj,intk) Return position of first in direction dir nonzero value of formula cond. The search is started from point {i,j,k}.
- Method on
mglData:boolFindAny (const char *cond)const - C function:
mrealmgl_data_find_any (HCDTdat,const char *cond) Determines if any nonzero value of formula in the data array.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
