1MAT_VARGETSTRUCTSLINE... BSD Library Functions Manual MAT_VARGETSTRUCTSLINE...
2
4 Mat_VarGetStructsLinear — Linearly index a structure variable
5
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
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 in‐
25 dicating that the fields should not be free'd. They are free'd when the
26 original structure is free'd.
27
29 A subarray of the original structure array, or NULL if there is an error.
30
32 Mat_VarGetStructs(3)
33
34BSD March 14, 2012 BSD