next up previous contents index
Next: Generating data vectors Up: DATA MANIPULATION Previous: DATA MANIPULATION

Scaling data

  

Suppose that a dipole magnet survey has just been completed and tied to an absolute NMR calibration at some point. This calibration requires the entire field measured to be scaled up by a factor of 1.0157. The field was measured over a 10 × 20 point grid and written into a file containing twenty lines, each line with ten numbers in 10F8.4 format. Only three commands are needed:        

 READ\MATRIX\FORMAT FIELD.DAT (10F8.4) B 10 20    ! read the data into matrix B
 B2 = 1.0157*B                                    ! scale the data
 WRITE\MATRIX\FORMAT FIELD2.DAT (10F8.4) B2       ! write to a file