dimanche 11 janvier 2015

how to read only positive values from data file

i am new to IDL. I have a data file consists of 4 column, 96 rows (saved as new.dat). I am trying to read values only if 2nd column is positive but unable to do it.compiling well but getting no output.Help, please???



data=fltarr(4,96)


openr,1,'new.dat' openw,2,'file.dat' readf,1,data for i=0,95 do begin if (data(1,*) ge 0) then printf,2, data endfor close,/all


Aucun commentaire:

Enregistrer un commentaire