Mercurial > hg > aimc
comparison matlab/AIMCread.m @ 157:ce97ae23c66b
- Added support for a very basic AIM-C file format
author | tomwalters@google.com |
---|---|
date | Thu, 27 May 2010 07:25:03 +0000 |
parents | f03d4455b262 |
children | 988c8b6f7946 |
comparison
equal
deleted
inserted
replaced
156:c257ef1919f3 | 157:ce97ae23c66b |
---|---|
10 | 10 |
11 fid = fopen(filename); | 11 fid = fopen(filename); |
12 | 12 |
13 debug = 0; | 13 debug = 0; |
14 | 14 |
15 nFrames = fread( fid, 1, 'uint32'); | 15 nFrames = fread( fid, 1, 'int32'); |
16 period = fread( fid, 1, 'float32'); % Frame period in ms | 16 period = fread( fid, 1, 'float32'); % Frame period in ms |
17 nChannels = fread( fid, 1, 'uint32'); % vertical axis of an AI | 17 nChannels = fread( fid, 1, 'int32'); % vertical axis of an AI |
18 nSamples = fread( fid, 1, 'uint32'); % horizontal axis of an AI | 18 nSamples = fread( fid, 1, 'int32'); % horizontal axis of an AI |
19 sample_rate = fread(fid, 1, 'float32'); % sample rate of each channel in Hz | 19 sample_rate = fread(fid, 1, 'float32'); % sample rate of each channel in Hz |
20 | 20 |
21 if nChannels == 1 % temporal profiles | 21 if nChannels == 1 % temporal profiles |
22 data = fread( fid, [nSamples,nFrames], 'float32'); % transposed! | 22 data = fread( fid, [nSamples,nFrames], 'float32'); % transposed! |
23 data = data.'; | 23 data = data.'; |