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

8.23 Make another data (Pure C)

C function: HMDT mgl_data_subdata (const HMDT dat, int xx, int yy, int 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.

C function: HMDT mgl_data_column (const HMDT dat, const char *eq)

Get column (or slice) of the data filled by formula eq of other named columns. For example, Column("n*w^2/exp(t)");. The column ids must be defined first by SetColumnId() function.

C function: void mgl_data_set_id (HMDT dat, const char *ids)

Sets the symbol id for data columns. The string must contain one symbol 'a'...'z' per column (without spaces).

C function: HMDT mgl_data_hist (const HMDT dat, int n, float v1, float v2, int nsub)

Creates n-th points distribution of the data values in range [v1, v2]. Parameter nsub define the number of additional interpolated points (for smoothness of histogram).

C function: HMDT mgl_data_hist_w (const HMDT dat, const HMDT 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. Parameter nsub define the number of additional interpolated points (for smoothness of histogram).

C function: HMDT mgl_data_momentum (const HMDT dat, char dir, const char *how)

Get 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].

C function: HMDT mgl_data_sum (const HMDT dat, const char *dir)

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

C function: HMDT mgl_data_max_dir (const HMDT dat, const char *dir)

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

C function: HMDT mgl_data_min_dir (const HMDT dat, const char *dir)

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

C function: HMDT mgl_data_combine (const HMDT dat, const HMDT a)

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

C function: HMDT mgl_data_evaluate_i (const HMDT dat, const HMDT idat, int norm)
C function: HMDT mgl_data_evaluate_ij (const HMDT dat, const HMDT idat, const HMDT jdat, int norm)
C function: HMDT mgl_data_evaluate_ijk (const HMDT dat, const HMDT idat, const HMDT jdat, const HMDT kdat, int norm)

Get 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 range [0,nx], [0,ny], [0,nz] correspondingly.

C function: HMDT mgl_data_resize (const HMDT dat, int mx, int my, int mz)
C function: HMDT mgl_data_resize_box (const HMDT 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].


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.