Vector operations

Vector operations

zone 1 2 ve/create V1(10) R 1 2 3 4 5 5 4 3 2 1 vector/operations/vscale V1 0.5 V12 1 VE/OP/VSCALE V1 0.25 V14 ve/dr V1 ve/dr V12 ! S ve/dr V14 ! S 1 VSUB V1 V14 V14M ve/dr V1 set htyp 344 ve/dr V14M ! S set htyp 144 ve/dr V12 ! S

  1. Some simple operations are possible on vectors .
                                                                                                                       
          VBIAS     : Y(i) = a + X(i)                                                                                       
          VSCALE    : Y(i) = a * X(i)                                                                                       
          VADD      : Z(i) = X(i) + Y(i)                                                                                    
          VMULTIPLY : Z(i) = Z(i) * Y(i)                                                                                    
          VSUBSTRACT: Z(i) = X(i) - Y(i)                                                                                    
          VDIVIDE   : Z(i) = X(i) / Y(i)                                                                                    
    
    In these operations the resulting vectors are created automatically. Note that for operations with mathematical functions like SQRT or trigonometric functions etc... , SIGMA must be used (we will see examples later).



Last update: 96/05/24 17.18
Olivier.Couet@Cern.Ch