| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.4 Data filling
- MGL command: list DAT
v1 ... Creates new variable with name dat and fills it by numeric values of command arguments
v1 .... Command can create one-dimensional and two-dimensional arrays with arbitrary values. For creating 2d array the user should use delimiter ‘|’ which means that the following values lie in next row. Array sizes are [maximal of row sizes * number of rows]. For example, commandlist 1 | 2 3creates the array [1 0; 2 3]. Note, that the maximal number of arguments is 1000.
- MGL command: list DAT d1 ...
Creates new variable with name dat and fills it by data values of arrays of command arguments d1 .... Command can create two-dimensional or three-dimensional (if arrays in arguments are 2d arrays) arrays with arbitrary values. Minor dimensions of all arrays in arguments should be equal to dimensions of first array d1. In the opposite case the argument will be ignored. Note, that the maximal number of arguments is 1000.
- Method on
mglData:voidSet (const float *A,intNX,intNY=1,intNZ=1) - Method on
mglData:voidSet (const double *A,intNX,intNY=1,intNZ=1) - C function:
voidmgl_data_set_float (HMDTdat,const mreal *A,intNX,intNY,intNZ) - C function:
voidmgl_data_set_double (HMDTdat,const double *A,intNX,intNY,intNZ) - Method on
mglDataC:voidSet (const float *A,intNX,intNY=1,intNZ=1) - Method on
mglDataC:voidSet (const double *A,intNX,intNY=1,intNZ=1) - Method on
mglDataC:voidSet (const dual *A,intNX,intNY=1,intNZ=1) - C function:
voidmgl_datac_set_float (HADTdat,const mreal *A,intNX,intNY,intNZ) - C function:
voidmgl_datac_set_double (HADTdat,const double *A,intNX,intNY,intNZ) - C function:
voidmgl_datac_set_complex (HADTdat,const dual *A,intNX,intNY,intNZ) Allocates memory and copies the data from the flat
float*ordouble*array.
- Method on
mglData:voidSet (const float **A,intN1,intN2) - Method on
mglData:voidSet (const double **A,intN1,intN2) - C function:
voidmgl_data_set_mreal2 (HMDTdat,const mreal **A,intN1,intN2) - C function:
voidmgl_data_set_double2 (HMDTdat,const double **A,intN1,intN2) Allocates memory and copies the data from the
float**ordouble**array with dimensions N1, N2, i.e. from array defined asmreal a[N1][N2];.
- Method on
mglData:voidSet (const float ***A,intN1,intN2) - Method on
mglData:voidSet (const double ***A,intN1,intN2) - C function:
voidmgl_data_set_mreal3 (HMDTdat,const mreal ***A,intN1,intN2) - C function:
voidmgl_data_set_double3 (HMDTdat,const double ***A,intN1,intN2) Allocates memory and copies the data from the
float***ordouble***array with dimensions N1, N2, N3, i.e. from array defined asmreal a[N1][N2][N3];.
- Method on
mglData:voidSet (gsl_vector *v) - Method on
mglDataC:voidSet (gsl_vector *v) - C function:
voidmgl_data_set_vector (HMDTdat,gsl_vector *v) - C function:
voidmgl_datac_set_vector (HADTdat,gsl_vector *v) Allocates memory and copies the data from the
gsl_vector *structure.
- Method on
mglData:voidSet (gsl_matrix *m) - Method on
mglDataC:voidSet (gsl_matrix *m) - C function:
voidmgl_data_set_matrix (HMDTdat,gsl_matrix *m) - C function:
voidmgl_datac_set_matrix (HADTdat,gsl_matrix *m) Allocates memory and copies the data from the
gsl_matrix *structure.
- Method on
mglData:voidSet (const mglDataA &from) - Method on
mglData:voidSet (HCDTfrom) - C function:
voidmgl_data_set (HMDTdat,HCDTfrom) - Method on
mglDataC:voidSet (const mglDataA &from) - Method on
mglDataC:voidSet (HCDTfrom) - C function:
voidmgl_datac_set (HADTdat,HCDTfrom) Copies the data from
mglData(ormglDataA) instance from.
- Method on
mglDataC:voidSet (const mglDataA &re,const mglDataA &im) - Method on
mglDataC:voidSet (HCDTre,HCDTim) - Method on
mglDataC:voidSetAmpl (HCDTampl,const mglDataA &phase) - C function:
voidmgl_datac_set_ri (HADTdat,HCDTre,HCDTim) - C function:
voidmgl_datac_set_ap (HADTdat,HCDTampl,HCDTphase) Copies the data from
mglDatainstances for real and imaginary parts of complex data arrays.
- Method on
mglData:voidSet (const std::vector<int> &d) - Method on
mglDataC:voidSet (const std::vector<int> &d) - Method on
mglData:voidSet (const std::vector<float> &d) - Method on
mglDataC:voidSet (const std::vector<float> &d) - Method on
mglData:voidSet (const std::vector<double> &d) - Method on
mglDataC:voidSet (const std::vector<double> &d) - Method on
mglDataC:voidSet (const std::vector<dual> &d) Allocates memory and copies the data from the
std::vector<T>array.
- Method on
mglData:voidSet (const char *str,intNX,intNY=1,intNZ=1) - C function:
voidmgl_data_set_values (const char *str,intNX,intNY,intNZ) - Method on
mglDataC:voidSet (const char *str,intNX,intNY=1,intNZ=1) - C function:
voidmgl_datac_set_values (const char *str,intNX,intNY,intNZ) Allocates memory and scanf the data from the string.
- Method on
mglData:voidLink (mglData &from) - Method on
mglData:voidLink (mreal *A,intNX,intNY=1,intNZ=1) - C function:
voidmgl_data_link (HMDTdat,mreal *A,intNX,intNY,intNZ) - Method on
mglDataC:voidLink (mglDataC &from) - Method on
mglDataC:voidLink (dual *A,intNX,intNY=1,intNZ=1) - C function:
voidmgl_datac_link (HADTdat,dual *A,intNX,intNY,intNZ) Links external data array, i.e. don’t delete this array at exit.
- MGL command: var DAT
num v1 [v2=nan] Creates new variable with name dat for one-dimensional array of size num. Array elements are equidistantly distributed in range [v1, v2]. If v2=
nanthen v2=v1 is used.
- MGL command: fill dat v1 v2 ['dir'='x']
- Method on
mglData:voidFill (mrealv1,mrealv2,chardir='x') - Method on
mglDataC:voidFill (dualv1,dualv2,chardir='x') - C function:
voidmgl_data_fill (HMDTdat,mrealv1,mrealv2,chardir) - C function:
voidmgl_datac_fill (HADTdat,dualv1,dualv2,chardir) Equidistantly fills the data values to range [v1, v2] in direction dir={‘x’,‘y’,‘z’}.
- MGL command: fill dat 'eq'
- MGL command: fill dat 'eq' vdat
- MGL command: fill dat 'eq' vdat wdat
- Method on
mglData:voidFill (HMGLgr,const char *eq,const char *opt="") - Method on
mglData:voidFill (HMGLgr,const char *eq,const mglDataA &vdat,const char *opt="") - Method on
mglData:voidFill (HMGLgr,const char *eq,const mglDataA &vdat,const mglDataA &wdat,const char *opt="") - Method on
mglDataC:voidFill (HMGLgr,const char *eq,const char *opt="") - Method on
mglDataC:voidFill (HMGLgr,const char *eq,const mglDataA &vdat,const char *opt="") - Method on
mglDataC:voidFill (HMGLgr,const char *eq,const mglDataA &vdat,const mglDataA &wdat,const char *opt="") - C function:
voidmgl_data_fill_eq (HMGLgr,HMDTdat,const char *eq,HCDTvdat,HCDTwdat,const char *opt) - C function:
voidmgl_datac_fill_eq (HMGLgr,HADTdat,const char *eq,HCDTvdat,HCDTwdat,const char *opt) Fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in axis range of canvas gr (in difference from
Modifyfunctions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can beNULL(i.e. can be omitted).
- MGL command: modify dat 'eq' [
dim=0] - MGL command: modify dat 'eq' vdat
- MGL command: modify dat 'eq' vdat wdat
- Method on
mglData:voidModify (const char *eq,intdim=0) - Method on
mglData:voidModify (const char *eq,const mglDataA &v) - Method on
mglData:voidModify (const char *eq,const mglDataA &v,const mglDataA &w) - Method on
mglDataC:voidModify (const char *eq,intdim=0) - Method on
mglDataC:voidModify (const char *eq,const mglDataA &v) - Method on
mglDataC:voidModify (const char *eq,const mglDataA &v,const mglDataA &w) - C function:
voidmgl_data_modify (HMDTdat,const char *eq,intdim) - C function:
voidmgl_data_modify_vw (HMDTdat,const char *eq,HCDTv,HCDTw) - C function:
voidmgl_datac_modify (HADTdat,const char *eq,intdim) - C function:
voidmgl_datac_modify_vw (HADTdat,const char *eq,HCDTv,HCDTw) The same as previous ones but coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in range [0,1]. If dim>0 is specified then modification will be fulfilled only for slices >=dim.
- MGL command: fillsample dat 'how'
- Method on
mglData:voidFillSample (const char *how) - C function:
voidmgl_data_fill_sample (HMDTa,const char *how) Fills data by ’x’ or ’k’ samples for Hankel (’h’) or Fourier (’f’) transform.
- MGL command: datagrid dat xdat ydat zdat
- Method on
mglData:mglDataGrid (HMGLgr,const mglDataA &x,const mglDataA &y,const mglDataA &z,const char *opt="") - Method on
mglData:mglDataGrid (const mglDataA &x,const mglDataA &y,const mglDataA &z,mglPointp1,mglPointp2) - C function:
voidmgl_data_grid (HMGLgr,HMDTu,HCDTx,HCDTy,HCDTz,const char *opt) - C function:
voidmgl_data_grid_xy (HMDTu,HCDTx,HCDTy,HCDTz,mrealx1,mrealx2,mrealy1,mrealy2) Fills the value of array according to the linear interpolation of triangulated surface assuming x-,y-coordinates equidistantly distributed in axis range (or in range [x1,x2]*[y1,y2]). Triangulated surface is found for arbitrary placed points ‘x’, ‘y’, ‘z’. NAN value is used for grid points placed outside of triangulated surface. See section Making regular data, for sample code and picture.
- MGL command: put dat
val [i=: j=: k=:] - Method on
mglData:voidPut (mrealval,inti=-1,intj=-1,intk=-1) - Method on
mglDataC:voidPut (dualval,inti=-1,intj=-1,intk=-1) - C function:
voidmgl_data_put_val (HMDTa,mrealval,inti,intj,intk) - C function:
voidmgl_datac_put_val (HADTa,dualval,inti,intj,intk) Sets value(s) of array a[i, j, k] = val. Negative indexes i, j, k=-1 set the value val to whole range in corresponding direction(s). For example,
Put(val,-1,0,-1);sets a[i,0,j]=val for i=0...(nx-1), j=0...(nz-1).
- MGL command: put dat vdat [
i=: j=: k=:] - Method on
mglData:voidPut (const mglDataA &v,inti=-1,intj=-1,intk=-1) - Method on
mglDataC:voidPut (const mglDataA &v,inti=-1,intj=-1,intk=-1) - C function:
voidmgl_data_put_dat (HMDTa,HCDTv,inti,intj,intk) - C function:
voidmgl_datac_put_dat (HADTa,HCDTv,inti,intj,intk) Copies value(s) from array v to the range of original array. Negative indexes i, j, k=-1 set the range in corresponding direction(s). At this minor dimensions of array v should be large than corresponding dimensions of this array. For example,
Put(v,-1,0,-1);sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.
- MGL command: refill dat xdat vdat [sl=-1]
- MGL command: refill dat xdat ydat vdat [sl=-1]
- MGL command: refill dat xdat ydat zdat vdat
- Method on
mglData:voidRefill (const mglDataA &x,const mglDataA &v,mrealx1,mrealx2,longsl=-1) - Method on
mglData:voidRefill (const mglDataA &x,const mglDataA &v,mglPointp1,mglPointp2,longsl=-1) - Method on
mglData:voidRefill (const mglDataA &x,const mglDataA &y,const mglDataA &v,mglPointp1,mglPointp2,longsl=-1) - Method on
mglData:voidRefill (const mglDataA &x,const mglDataA &y,const mglDataA &z,const mglDataA &v,mglPointp1,mglPointp2) - Method on
mglData:voidRefill (HMGLgr,const mglDataA &x,const mglDataA &v,longsl=-1,const char *opt="") - Method on
mglData:voidRefill (HMGLgr,const mglDataA &x,const mglDataA &y,const mglDataA &v,longsl=-1,const char *opt="") - Method on
mglData:voidRefill (HMGLgr,const mglDataA &x,const mglDataA &y,const mglDataA &z,const mglDataA &v,const char *opt="") - C function:
voidmgl_data_refill_x (HMDTa,HCDTx,HCDTv,mrealx1,mrealx2,longsl) - C function:
voidmgl_data_refill_xy (HMDTa,HCDTx,HCDTy,HCDTv,mrealx1,mrealx2,mrealy1,mrealy2,longsl) - C function:
voidmgl_data_refill_xyz (HMDTa,HCDTx,HCDTy,HCDTz,HCDTv,mrealx1,mrealx2,mrealy1,mrealy2,mrealz1,mrealz2) - C function:
voidmgl_data_refill_gr (HMGLgr,HMDTa,HCDTx,HCDTy,HCDTz,HCDTv,longsl,const char *opt) Fills by interpolated values of array v at the point {x, y, z}={
X[i], Y[j], Z[k]} (or {x, y, z}={X[i,j,k], Y[i,j,k], Z[i,j,k]} if x, y, z are not 1d arrays), whereX,Y,Zare equidistantly distributed in range [x1,x2]*[y1,y2]*[z1,z2] and have the same sizes as this array. If parameter sl is 0 or positive then changes will be applied only for slice sl.
- MGL command: idset dat 'ids'
- Method on
mglData:voidSetColumnId (const char *ids) - Method on
mglDataC:voidSetColumnId (const char *ids) - C function:
voidmgl_data_set_id (HMDTa,const char *ids) - C function:
voidmgl_datac_set_id (HADTa,const char *ids) Sets the symbol ids for data columns. The string should contain one symbol ’a’...’z’ per column. These ids are used in column.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
