How to save an ascii file?
Barbara
I have Igor waves, and I would like to write on a file two columns, one wave and the second one. But the file should be an ASCII one, without any extension.
I succeed to do it in a .txt file with the wfprintf function, but then I cannot open it with another program I must use.
I also thougth about making a 2 columns wave, and then save it, but I am not sure that the file will be ASCII. Moreover, I am doing this operation in a loop, so that I save 116 files each time, and then I cannot write 116 times the name of the wave...
I am a bit lost, does anybody know how to solve this problem?
Thanks in advance
Barbara
newpath/o/q mypath
and in the loop:
Save/O/G/M="\r\n"/DSYM=""/P=mypath wave0,wave1 as "asciiFile"
.In that case the two columns are tab-delimited. If the loop cycles through a bunch of waves you have to pass the waves and the name of the ascii file dynamically to the save operation. That's where the /B flag of the Save operation might come in handy (
displayhelptopic "Save"
).You may want to kill the path afterwards (after the loop):
killpath mypath
A
January 26, 2011 at 04:46 am - Permalink
To include properly-formatted code in a post, use <igor> and </igor> tags as explained here.
January 26, 2011 at 10:32 am - Permalink