[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
8.19 File I/O (MGL)
- MGL command: read dat 'fname'
Reads data from tab-separated text file with auto determining sizes of the data.
- MGL command: read dat 'fname'
mx [my=1 mz=1]
Reads data from text file with specified data sizes. This command does nothing if one of parameters mx, my or mz is zero or negative.
- MGL command: readmat dat 'fname' [
dim=2
] Read data from text file with size specified at beginning of the file by first dim numbers. At this, variable dim set data dimensions.
- MGL command: readall dat 'templ'
v1 v2 [dv=1 slice=off]
Join data arrays from several text files. The file names are determined by function call
sprintf(fname,templ,val);
, where val changes from v1 to v2 with step dv. The data load one-by-one in the same slice if slice=off
or as slice-by-slice if slice=on
.
- MGL command: readall dat 'templ'
[slice=off]
Join data arrays from several text files which filenames satisfied the template templ (for example, templ=
"t_*.dat"
). The data load one-by-one in the same slice if slice=off
or as slice-by-slice if slice=on
.
- MGL command: import dat 'fname' 'sch' [
v1=0 v2=1
] Reads data from bitmap file. The RGB values of bitmap pixels are transformed to float values in range [v1, v2] using color scheme sch (see section Color scheme).
- MGL command: export dat 'fname' 'sch' [
v1=0 v2=0
] Saves data matrix to bitmap file. The data values are transformed from range [v1, v2] to RGB pixels of bitmap using color scheme sch (see section Color scheme). If v1>=v2 then the values of v1, v2 are automatically determined as minimal and maximal value of the data array.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |