1MAT_VARGETSTRUCTS(3)     BSD Library Functions Manual     MAT_VARGETSTRUCTS(3)
2

NAME

4     Mat_VarGetStructs — Index a structure variable using slices of each
5     dimension
6

SYNOPSIS

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

DESCRIPTION

15     The Mat_VarGetStructs() function selects a subarray from a structure
16     array matvar. Each of the elements in the subarray contains all of the
17     fields of the structure. The index of each dimension starts at the start
18     element in the array (0 being the first element), and reads every stride
19     values (1 being every element, 2 every other element, etc.). The total
20     number of elements in the subarray is specified as edge. The copy_fields
21     option specifies whether the fields of the original structure are copied
22     for the new subarray. If set to 0, the returned structure array's fields
23     have the same pointer as the original array, and the data field of the
24     subarray 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 the
26     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_VarGetStructsLinear(3),
33
34BSD                             March 16, 2012                             BSD
Impressum