Mercurial > hg > aimc
comparison matlab/AIMCread.m @ 142:f03d4455b262
- AIMC format file output
author | tom@acousticscale.org |
---|---|
date | Thu, 04 Nov 2010 19:48:53 +0000 |
parents | c8024714e13e |
children | ce97ae23c66b |
comparison
equal
deleted
inserted
replaced
141:bbf4728ffa0e | 142:f03d4455b262 |
---|---|
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.'; |