Mercurial > hg > aimc
comparison trunk/matlab/AIMCread.m @ 440:99f9bf0f7798
- AIMC format file output
author | tom@acousticscale.org |
---|---|
date | Thu, 04 Nov 2010 19:48:53 +0000 |
parents | c74acd46121b |
children | b5dca605c3d5 |
comparison
equal
deleted
inserted
replaced
439:2fca84ddd8e3 | 440:99f9bf0f7798 |
---|---|
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, 'int32'); | 15 nFrames = fread( fid, 1, 'uint32'); |
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, 'int32'); % vertical axis of an AI | 17 nChannels = fread( fid, 1, 'uint32'); % vertical axis of an AI |
18 nSamples = fread( fid, 1, 'int32'); % horizontal axis of an AI | 18 nSamples = fread( fid, 1, 'uint32'); % 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.'; |