Description
Read named MATLAB variables, including nested structure or cell paths, and
map them to output fields. Choose field mappings to control which variables
are imported and how their dimensions are represented in the dataset.
Synopsis
sgloadmat <stdin -dump=STDOUT >stdout
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
in |
ifile |
stdin
|
input MATLAB file; map a MATLAB variable to an output field as follows: field=matlab.variable |
-dump |
bool |
STDOUT
|
list the MATLAB variable hierarchy instead of creating a dataset; defaults to true on a terminal |
out |
ofile |
stdout
|
output SIGCLEAR dataset: 1. MATLAB matrix rows become vector samples 2. MATLAB matrix columns become SIGCLEAR dataset columns |
Input and output
Input
input MATLAB file; map a MATLAB variable to an output field as follows: field=matlab.variable
Output
output SIGCLEAR dataset: 1. MATLAB matrix rows become vector samples 2. MATLAB matrix columns become SIGCLEAR dataset columns
Examples
1. Import a MATLAB variable nested in a cell and structure
sgloadmat -dump=n field='cell[0][0].struct.structfield' <input.mat >output.sgThe input MAT-file must contain the specified path; quote brackets for the shell.
Matrix rows become vector samples and columns become SOIG columns.
2. Transpose a MATLAB matrix before importing it
sgloadmat -dump=n field=variable.T <input.mat >transposed.sgThe input MAT-file must contain variable. The .T suffix transposes its layout
before rows become vector samples and columns become SOIG columns.
Inspect output dimensions and values; these examples require suitable MAT-files.