Mat_VarGetStructs (3) - Linux Man Pages

Mat_VarGetStructs: Index a structure variable using slices of each dimension

NAME

Mat_VarGetStructs - Index a structure variable using slices of each dimension

SYNOPSIS

Fd #include <matio.h> Ft matvar_t * Fo Mat_VarGetStructs Fa const matvar_t *matvar Fa int *start Fa int *stride Fa int *edge Fa int copy_fields Fc

DESCRIPTION

The Fn Mat_VarGetStructs function selects a subarray from a structure array Fa matvar. Each of the elements in the subarray contains all of the fields of the structure. The index of each dimension starts at the Fa start element in the array (0 being the first element), and reads every Fa stride values (1 being every element, 2 every other element, etc.). The total number of elements in the subarray is specified as Fa edge. The Fa copy_fields option specifies whether the fields of the original structure are copied for the new subarray. If set to 0, the returned structure array's fields have the same pointer as the original array, and the data field of the subarray structure. The subarray is marked with the conserve memory flag indicating that the fields should not be free'd. They are free'd when the original structure is free'd.

RETURN VALUES

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

SEE ALSO

Mat_VarGetStructsLinear3,