Save as txt or csv?

46 views
Skip to first unread message

kelseyt...@gmail.com

unread,
Mar 13, 2019, 2:05:33 PM3/13/19
to WaveSurfer

I was wondering if there was an easy way to save raw single channel data (plus time) as a txt or csv file in wavesurfer.

Right now I am trying to open the information on a mac using hdf5info and hdf5read.

Thank you!

Adam Taylor

unread,
Mar 13, 2019, 3:08:20 PM3/13/19
to WaveSurfer
If you're using Matlab, you can use ws.loadDataFile() to read the
data, and then use csvwrite() to save to .csv, or save() with the
-ascii option to save as text. fprintf() and dlmwrite() are other
options for outputting to text files.

But: In the latest WaveSurfer release (0.981), there's a bug in
ws.loadDataFile() that causes it to not work on the Mac. There will
be a release in the next week or so that fixes this, but in the
meantime: Search for "ws.scaledDoubleAnalogDataFromRawMex" in the file
+ws/loadDataFile.m, and change it to
"ws.scaledDoubleAnalogDataFromRaw". (In other words, delete the "Mex"
part at the end.) This should make ws.loadDataFile() work on the Mac.

Hope this helps,
Adam
Reply all
Reply to author
Forward
0 new messages