help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Increase efficiency of nested loops that use str2double and datenum func


From: Jared Stofflett
Subject: Increase efficiency of nested loops that use str2double and datenum functions?
Date: Mon, 08 Dec 2008 04:01:14 -0500
User-agent: Thunderbird 2.0.0.18 (Windows/20081105)

The following code operates on a cell matrix obtained using the sqlite3 package. It takes several minutes to run with a matrix containing about 20000 rows. The bottlenecks appear to be the datenum and str2double functions. Any help on increasing it's efficiency would be appreciated.

DJI2=0;
for i=1:length(DJI)
DJI2(i,1)=datenum(char(DJI(i,2)),'yyyy-mm-dd');
for j=3:7
DJI2(i,j-1)=str2double(char(DJI(i,j)));
end
end


reply via email to

[Prev in Thread] Current Thread [Next in Thread]