Mercurial > hg > ltpda
diff m-toolbox/test/tdfit/convert_data.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/test/tdfit/convert_data.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,58 @@ +% Convert the large text files into individual AOs and store as XML files. +% +% M Hewitson 18-03-07 +% +% + +clear; + +fs = 32.46; + +%% Load data + +% unfiltered Data +data=load('./Data/2007-02-26_18-37.txt'); +x1 = data(:,1); +nsecs = length(x1)/fs; +t = [linspace(0, nsecs-1/fs, nsecs*fs)].'; +out = [t x1]; +save 'x1.txt' out -ASCII -DOUBLE -TABS +disp('done x1') + +x1 = data(:,2); +nsecs = length(x1)/fs; +t = [linspace(0, nsecs-1/fs, nsecs*fs)].'; +out = [t x1]; +save 'x12.txt' out -ASCII -DOUBLE -TABS +disp('done x12') + +x1 = data(:,3); +nsecs = length(x1)/fs; +t = [linspace(0, nsecs-1/fs, nsecs*fs)].'; +out = [t x1]; +save 'phi1.txt' out -ASCII -DOUBLE -TABS +disp('done phi1') + +x1 = data(:,4); +nsecs = length(x1)/fs; +t = [linspace(0, nsecs-1/fs, nsecs*fs)].'; +out = [t x1]; +save 'eta1.txt' out -ASCII -DOUBLE -TABS +disp('done eta1') + +x1 = data(:,5); +nsecs = length(x1)/fs; +t = [linspace(0, nsecs-1/fs, nsecs*fs)].'; +out = [t x1]; +save 'phi12.txt' out -ASCII -DOUBLE -TABS +disp('done phi12') + +x1 = data(:,6); +nsecs = length(x1)/fs; +t = [linspace(0, nsecs-1/fs, nsecs*fs)].'; +out = [t x1]; +save 'eta12.txt' out -ASCII -DOUBLE -TABS +disp('done eta12') + +disp('*** Done.') +clear data;