Importing Saleae 2 channel data

14 visualizzazioni (ultimi 30 giorni)
Brian Rose
Brian Rose il 23 Mag 2019
Risposto: Karun Mathiazhagan il 30 Mag 2019
I have a Saleae Logic analyzer and I am trying to look at the captured data. It is I2S data, which has the left and right channel data interleaved. The file the Saleae program creates is a CSV and is formatted like this...
Time, Left/Right, Value
-0.002 , 1 , 0
-0.000 , 2 , 0
0.001 , 1 , 10
0.002 , 2 , 15
...
The Time value is the offset from the defined trigger, in seconds. The Left/Right is a 1 or a 2 based on if the Value represents the signal value for the left channel or the right channel. I'd like to end up with two vectors containing the data for their respective channels.
I'm new to MATLAB and I could probably clobber together a program to do this that would iterate through the data and sort it into two vectors. Can anyone show me an elegant way to do this? I'm guessing there is some one liner out there that handles this.

Risposte (1)

Karun Mathiazhagan
Karun Mathiazhagan il 30 Mag 2019
Hello Brian,
MATLAB offers a range of functionality dedicated to the automated data import and export of different kinds of files. Please feel free to run through the following resource which is particularly relevant to different kinds of delimited and formatted text files (including CSV files):
You may want to take a look at the interactive tool which should further ease the process:
I hope this helps.
Best,
Karun

Prodotti


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by