PIVMat Function Reference<< Prev | Next >> 
operf
Perform operation on vector/scalar fields

Description
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 '.^' : adds, subtracts etc. the value N. If F 
        is a vector field, N must be an array of 2 (or 3) components 
        for '+' or '-', but a scalar value for the other operators. 
   '>', '<', '=', '>=', '<=' : conserves only the values of the fields 
        satisfying the criterion F>N (or F<N etc.) 
   'b>', 'b<', 'b=', 'b>=', 'b<=' : binarizes the fields according to 
        the criterion F>N (or F<N etc.) 
 
FF = operf(OP,F) performs the unary operation OP on field(s) F. 
Valid operations are: 
  - '-' (inverts the field), '+' (does nothing) 
  - '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: openvecNext: phaseaverf 

2005-2021 PIVMat Toolbox 4.20