User manual
Menus38
Copyright © 2007-2013 Pico Technology Ltd. All rights reserved.psw.en r32
Note. CSV files are not the best choice of format if you are working in a language that
uses the comma character as the decimal point. Instead, try using the tab-delimited
format which works in almost the same way.
Tab-delimited
Tab-delimited files store data in the following format: -
Time
(µs)
Channel A
(V)
Channel B
(V)
500.004
5.511
1.215
-500.002
4.724
2.130
-500
5.552
2.212
…
The files have a tab character after each value on a line to represent a column of data
and a carriage return at the end of the line to represent a new row of data. These files
work in any language and are a good choice for sharing data internationally. The 1
million values per channel limit prevents excessively large files being created.
6.1.1.1.2
Binary formats
PicoScope 6 can export data in version 4 of the .mat binary file format. This is an
open format and the full specification is freely available from the www.mathworks.com
website. PicoScope 6 saves data into the MAT-File format in a specific way, which is
detailed below.
Importing into MATLAB
Load the file into your workspace using this syntax: -
load myfile
Each channel’s data is stored in an array variable named by the channel. So, the
sampled data for channels A to D would be in four arrays named A, B, C and D.
There is only one set of time data for all channels and this is loaded in one of two
possible formats:
1. A start time, an interval and a length. The variables are named Tstart, Tinterval
and Length.
2. An array of times (sometimes used for ETS data). The time array is named T.
If the times are loaded in as Tstart, Tinterval and Length then you can use the
following command to create the equivalent array of times: -
T = [Tstart : Tinterval : Tstart + (Length – 1) * Tinterval];
Note: The size of the largest file that MATLAB can open depends on the resources of
the computer. It is therefore possible for PicoScope to create a MATLAB file that some
installations of MATLAB might be unable to open. Please be aware of this risk when
saving critical data.
Exploring the file format
The full file specification, available from www.mathworks.com, is comprehensive so
this guide does not describe the entire format. Instead, this guide describes enough of
the format to allow you to get data from the file and use it in your own program.