manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.6 Make another data

MGL command: subdata RES dat xx [yy=: zz=:]
Method on mglData: mglData SubData (float xx, float yy=-1, float zz=-1) const
C function: HMDT mgl_data_subdata (HCDT dat, float xx, float yy, float zz)

Extracts sub-array data from the original data array keeping fixed positive index. For example SubData(-1,2) extracts 3d row (indexes are zero based), SubData(4,-1) extracts 5th column, SubData(-1,-1,3) extracts 4th slice and so on. If argument(s) are non-integer then linear interpolation between slices is used. In MGL version this command usually is used as inline one dat(xx,yy,zz).

MGL command: subdata RES dat xdat [ydat=: zdat=:]
Method on mglData: mglData SubData (const mglData &xx, const mglData &yy, const mglData &zz) const
C function: HMDT mgl_data_subdata_ext (HCDT dat, HCDT xx, HCDT yy, HCDT zz)

Extracts sub-array data from the original data array for indexes specified by arrays xx, yy, zz (indirect access). This function work like previous one for 1D arguments or numbers, and resulting array dimensions are equal dimensions of 1D arrays for corresponding direction. For 2D and 3D arrays in arguments, the resulting array have the same dimensions as input arrays. The dimensions of all argument must be the same (or to be scalar 1*1*1) if they are 2D or 3D arrays. In MGL version this command usually is used as inline one dat(xx,yy,zz).

MGL command: column RES dat 'eq'
Method on mglData: mglData Column (const char *eq) const
C function: HMDT mgl_data_column (HCDT dat, const char *eq)

Get column (or slice) of the data filled by formula eq on column ids. For example, Column("n*w^2/exp(t)");. The column ids must be defined first by idset function or read from files. In MGL version this command usually is used as inline one dat('eq').

MGL command: resize RES dat mx [my=1 mz=1]
Method on mglData: mglData Resize (int mx, int my=1, int mz=1, float x1=0, float x2=1, float y1=0, float y2=1, float z1=0, float z2=1) const
C function: HMDT mgl_data_resize (HCDT dat, int mx, int my, int mz)
C function: HMDT mgl_data_resize_box (HCDT dat, int mx, int my, int mz, float x1, float x2, float y1, float y2, float z1, float z2)

Resizes the data to new size mx, my, mz from box (part) [x1,x2] x [y1,y2] x [z1,z2] of original array. Initially x,y,z coordinates are supposed to be in [0,1].

MGL command: evaluate RES dat idat [norm=on]
MGL command: evaluate RES dat idat jdat [norm=on]
MGL command: evaluate RES dat idat jdat kdat [norm=on]
Method on mglData: mglData Evaluate (const mglData &idat, bool norm=true) const
Method on mglData: mglData Evaluate (const mglData &idat, const mglData &jdat, bool norm=true) const
Method on mglData: mglData Evaluate (const mglData &idat, const mglData &jdat, const mglData &kdat, bool norm=true) const
C function: HMDT mgl_data_evaluate (HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm)

Gets array which values is result of interpolation of original array for coordinates from other arrays. All dimensions must be the same for data idat, jdat, kdat. Coordinates from idat, jdat, kdat are supposed to be normalized in range [0,1] (if norm=true) or in ranges [0,nx], [0,ny], [0,nz] correspondingly.

MGL command: hist RES dat num v1 v2 [nsub=0]
MGL command: hist RES dat wdat num v1 v2 [nsub=0]
Method on mglData: mglData Hist (int n, float v1=0, float v2=1, int nsub=0) const
Method on mglData: mglData Hist (const mglData &w, int n, float v1=0, float v2=1, int nsub=0) const
C function: HMDT mgl_data_hist (HCDT dat, int n, float v1, float v2, int nsub)
C function: HMDT mgl_data_hist_w (HCDT dat, HCDT w, int n, float v1, float v2, int nsub)

Creates n-th points distribution of the data values in range [v1, v2]. Array w specifies weights of the data elements (by default is 1). Parameter nsub define the number of additional interpolated points (for smoothness of histogram). See also Data manipulation

MGL command: momentum RES dat 'how' ['dir'='z']
Method on mglData: mglData Momentum (char dir, const char *how) const
C function: HMDT mgl_data_momentum (HCDT dat, char dir, const char *how)

Gets momentum (1D-array) of the data along direction dir. String how contain kind of momentum. The momentum is defined like as res_k = \sum_ij how(x_i,y_j,z_k) a_ij/ \sum_ij a_ij if var=‘z’ and so on. Coordinates ‘x’, ‘y’, ‘z’ are data indexes normalized in range [0,1].

MGL command: sum RES dat 'dir'
Method on mglData: mglData Sum (const char *dir) const
C function: HMDT mgl_data_sum (HCDT dat, const char *dir)

Gets array which is the result of summation in given direction or direction(s).

MGL command: max RES dat 'dir'
Method on mglData: mglData Max (const char *dir) const
C function: HMDT mgl_data_max_dir (HCDT dat, const char *dir)

Gets array which is the maximal data values in given direction or direction(s).

MGL command: min RES dat 'dir'
Method on mglData: mglData Min (const char *dir) const
C function: HMDT mgl_data_min_dir (HCDT dat, const char *dir)

Gets array which is the maximal data values in given direction or direction(s).

MGL command: combine RES adat bdat
Method on mglData: mglData Combine (const mglData &a) const
C function: HMDT mgl_data_combine (HCDT dat, HCDT a)

Returns direct multiplication of arrays (like, res[i,j] = this[i]*a[j] and so on).

MGL command: trace RES dat
Method on mglData: mglData Trace () const

Gets array of diagonal elements a[i,i] (for 2D case) or a[i,i,i] (for 3D case) where i=0...nx-1. Function return copy of itself for 1D case. Data array must have dimensions ny,nz >= nx or ny,nz = 1.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 13, 2012 using texi2html 5.0.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.