immport of data and loop
kaatii
Hello I am new with igor please I would like to import data (with a procedure) from several files with a loop and put the command if end if so as not to import values lower than 0 Can someone help me?
Hi,
I would do this in two steps, first import and then delete points less than zero on imported data.
for more precise guidance on setting this up we would need more details on the data files. In general my process starts starts with:
string the list,the run
variable Index,max index
newpath/o datafolder //this sets the path to the data source
thelist=indexedfile(datafolder,-1,”.csv”) //this makes a list of the data files
maxindex=itemsinlist(the list)
for (index=0;index<max index;index+=1)
load …. //details of you file
endfor
Andy
November 22, 2022 at 10:22 am - Permalink
ok thank you very much and I have another question I did not understand how to call a 2nd function
November 22, 2022 at 11:43 am - Permalink
Below are two approaches to call functions. This is likely the point where folks will suggest that you read the manual and do the tutorials on programming.
do_first()
do_second()
return 0
end
Function do_first()
print "In first"
return 0
end
Function do_second()
print "In second"
return 0
end
do_primary()
return 0
end
Function do_primary()
print "In primary"
do_secondary()
return 0
end
Function do_secondary()
print "In secondary"
return 0
end
November 22, 2022 at 01:27 pm - Permalink