PIVMat Function Reference | << Prev | Next >> |

Perform operation on vector/scalar fields

FF = **operf**(OP,F1,F2) performs operation specified by OP on the fields
F1 and F2. Valid operations are '+', '-', '.*' and './'. F1 and F2 must
be of the same type (vector or scalar fields). If
LENGTH(F1)=LENGTH(F2), the operation is performed for each field. If
LENGTH(F2)=1, the operation is performed using the single field F2 for
each field F1.
FF = **operf**(OP,F,N), where N is a number, performs operation specified
by OP on the field F. Valid operations are '+', '-', '*', '/' and '.^'.
FF = **operf**(OP,F) performs the unary operation OP on field(s) F.
Valid unary operations are:
- '+' (does nothing), '-' (inverts the field),
- 'log', 'exp', 'abs', 'logabs', 'real', 'imag', 'conj', etc.
- any MODE operation from vec2scal (e.g., **operf**('rot',V) is equivalent
to vec2scal(V,'rot')).
**operf**(..) without output argument shows the result with showf.

**Examples**
v = loadvec('*.vc7');
showf(**operf**('-',v));
showf(**operf**('/',vec2scal(v,'rot'),2));

**See Also**
vec2scal, showf, averf, spaverf, subaverf.
Published output in the Help browser
showdemo **operf**

Previous: openvec | Next: phaseaverf |

2005-2016 PIVMat Toolbox 4.01