1MAT_VARGETSTRUCTSLINE... BSD Library Functions Manual MAT_VARGETSTRUCTSLINE...
2

NAME

4     Mat_VarGetStructsLinear — Linearly index a structure variable
5

SYNOPSIS

7     #include <matio.h>
8
9     matvar_t *
10     Mat_VarGetStructsLinear(const matvar_t *matvar, int start, int stride,
11         int edge, int copy_fields);
12

DESCRIPTION

14     The Mat_VarGetStructsLinear() function selects a subarray from a struc‐
15     ture array matvar. Each of the elements in the subarray contains all of
16     the fields of the structure.  The indexing starts at the start element in
17     the array (0 being the first element), and reads every stride values (1
18     being every element, 2 every other element, etc.). The total number of
19     elements in the subarray is specified as edge. The original array must
20     have at least start+(stride-1)*edge+1 elements.  The copy_fields option
21     specifies whether the fields of the original structure are copied for the
22     new subarray.  If set to 0, the returned structure array's fields have
23     the same pointer as the original array, and the data field of the subar‐
24     ray structure.  The subarray is marked with the conserve memory flag
25     indicating that the fields should not be free'd.  They are free'd when
26     the original structure is free'd.
27

RETURN VALUES

29     A subarray of the original structure array, or NULL if there is an error.
30

SEE ALSO

32     Mat_VarGetStructs(3)
33
34BSD                             March 14, 2012                             BSD
Impressum