mat file format

Forum for discussing PicoScope (version 5)
Post Reply
Guest

mat file format

Post by Guest »

What is the *.mat file format ?
jlm

picojohn
Advanced User
Advanced User
Posts: 382
Joined: Mon Jun 11, 2007 1:10 pm

Post by picojohn »

Hello Jim,

That is a file format for Matlab 4.

Regards
John

Guest

Post by Guest »

Oh !
I am not stupide (sory)
but precisly can you describe this file format ?
jlm

markB
Site Admin
Site Admin
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Post by markB »

Section 6 of the PicoScope manual decribes the file format. Here is a brief summary:

The header
The file consists of a number of data blocks preceded by 20-byte headers. Each header contains five 32-bit integers (as described in the table below).

Bytes Value
0 – 3 Data format (0, 10 or 20)
4 – 7 Number of values
8 – 11 1
12 – 15 0
16 – 19 Name length

Data format
The ‘Data format’ in the first 4-bytes describes the type of numerical data in the array.
Value Description
0 Double (64-bit floating point)
10 Single (32-bit floating point)
20 Integer (32-bit)

Number of values
The ‘Number of values’ is a 32-bit integer describing the number of numerical values in the array. This value may be 1 for variables that only describe one value; but for arrays of samples or times, expect this to be a large number.

Name length
The ‘Name length’ is the length of the name of the variable as a null-terminated 1-byte per character ASCII string. The last null terminating character (‘\0’) is included in the ‘Name length’ so if the variable name is “TStartâ€
Regards

Mark

Post Reply