[Scilab-users] How to speed up making big structure?

jaipur acj119 at nifty.com
Fri Jul 3 09:42:14 CEST 2015


I'm making a big structure (about 110,000 items) by reading data from
Hipparcos star catalog text file.
My procedure is as follows.

MyStruct = struct(); Index = 0;
while ~meof(Fd) do
     ........
     ........
     Index = Index + 1;
     MyStruct(Index).Field1 = ...;
     MyStruct(Index).Field2 = ...;
     MyStruct(Index).Field3 = ...;
end

But this procedure takes huge time!!
The number of items is known. Could you teach me speedy way to make big
structure?
For example, keep memory for structure before starting like 

MyVector = ones(110000,1);





--
View this message in context: http://mailinglists.scilab.org/How-to-speed-up-making-big-structure-tp4032530.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list