[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is there something quicker than textscan?
From: |
maiky76 |
Subject: |
Is there something quicker than textscan? |
Date: |
Mon, 19 Mar 2012 00:25:17 -0700 (PDT) |
Hi,
I have to load quite a few files from an analyzer (.txt with 4 columns of
16384 lines of fft: freq, Gain, Phase and Coherence with plus a footer with
the analyzer settings that i don't care about).
I use the following code in a loop to store the data before performing some
calculation in the loop:
[...]
fid = fopen(D_FR(k).name);
data = textscan(fid,'%f %f %f %f',16384);
fclose(fid);
FRTF_gain(:,k) = data{1,2};
FRTF_phase(:,k) = data{1,3};
FRTF_coh(:,k) = data{1,4};
[...]
The slowest step by (very) far is the textscan process.
I average 85s per file with Octave 3.6.1 and 0.25s with Matlab 2010a.
Question: how could I load the data quicker than that in Octave?
Thanks
M
--
View this message in context:
http://octave.1599824.n4.nabble.com/Is-there-something-quicker-than-textscan-tp4483991p4483991.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Is there something quicker than textscan?,
maiky76 <=