The structure of PIVMat data

The structure of PIVMat data



Structure for a single vector / scalar field

The data for a single vector or scalar field is stored in the PIVMat toolbox within a structure. A structure is a Matlab "super-variable" that contains several "sub-variables", sometimes called "fields" (strings, arrays etc.). If you are not familiar with structures, please refer to the Matlab documentation.

Suppose you load a vector field originating from the DaVis file B00001.VC7 into the structure v:

v = loadvec('B00001.VC7');
Simply type v to see the content of this structure:
                 x: [1x128 double]
                 y: [1x128 double]
                vx: [128x128 double]
                vy: [128x128 double]
            choice: [0 0 0 0 15399 985]
             unitx: 'mm'
             unity: 'mm'
             namex: 'x'
             namey: 'y'
            unitvx: 'm/s'
            unitvy: 'm/s'
            namevx: 'u_x'
            namevy: 'u_y'
    pivmat_version: '1.81'
             ysign: 'Y axis upward'
        Attributes: [1x585 char]
              name: 'B00001.vc7'
           setname: 'jet'
           history: {'loadvec('B00001.vc7')'}
            source: 'DaVis 70'

The x and y components of the vector field are stored into the two matrices vx and vy. The axis are stored into the two vectors x and y.

To access to the content of the variable name, type

>> v.name
ans =
B00001.vc7

Content of the vector / scalar field structure

Two types of structures are used in PIVMat: Structure for vector fields and for scalar fields. They are actually very similar.

Structure for multiple vector / scalar fields

When handling more than one field, a structure array is used. A structure array is an array, in which each element is a structure

Most of the PIVMat tools allow for performing operations over more than one field at a time. You don't have to call a function for each e
 

2005-2009 PIVMat Toolbox