V = loadvec(FILENAME) loads the vector field from the file FILENAME
into the structure V. Supported file formats are:
.VEC Vector field from Davis 6.
.VC7 Vector field from Davis 7.
.TXT Vector field exported in TXT mode (see loadpivtxt)
.SET Set of vector fields (see loadset for details)
.MAT Any Matlab file containing a valid V structure (eg, files
converted by vec2mat, or the file 'set.mat' generated
by loadset).
The resulting structure array V can be displayed using showvec, or
converted into a scalar field using vec2scal.
If FILENAME is a cell array, (e.g. {'B1.vec','B2.vec'}), then loads all
the files in the structure array V. Wildcards (*) may be used (eg,
loadvec('B*.vec')). Brackets ([]) may also be used (see expandstr for
details). For example, V=loadvec('B[2:2:6].vec') loads the files
'B00002.vec','B00004.vec', 'B00006.vec'.
To load directly all the VEC/VC7 files of a directory, see loadset.
V = loadvec(NUM) loads the file number NUM from the current directory
(works in alphanumeric order, only for VEC and VC7 files). NUM may be a
simple number or any valid Matlab vector (eg, 1:10, [1 10], etc.)
loadvec without input argument first opens a dialog box for file
selection.
loadvec file_name or loadvec('file_name') without output argument is a
shortcut for showvec(loadvec('file_name')).
The structure V contains the following fields:
x,y: vectors containing the X and Y coordinates
vx,vy: matrices of the x and y components of the velocity
ysign: string, upward or downward Y axis
namevx, unitvx, namex, unitx...: strings
name: name of the VEC/VC7 file from which originates V
setname: name of the parent directory (called 'SET' in DaVis)
Attributes: Additional informations from DaVis
history: Remind from which command V has been obtained
Examples:
loadvec B00001.vc7
showvec(loadvec('*.vec'));
showscal(vec2scal(loadvec('B00001.vc7'),'rot'));
v=loadvec('B[2:2:6]*.v*');get
v=loadvec({'data1.set','data2.set'});
v=loadvec(1:10);
F. Moisy
Revision: 1.61, Date: 2005/12/20.
See Also
showvec, loadset, loadarrayvec, vec2mat, filterf, vec2scal,
batchvec, expandstr, rdir.