From: "Jim Simos" <jsimos@math.uoa.gr>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webx
Newsgroups: comp.soft-sys.matlab
Subject: Re: growing array in Matlab? (new code)
Message-ID: <ef11420.29@webx.raydaftYaTP>
Date: Sat, 20 Aug 2005 09:43:56 -0400
References: <woodchips-E55FA6.08284918082005@syrcnyrdrs-02-ge0.nyroc.rr.com> <woodchips-7262EC.11380018082005@syrcnyrdrs-03-ge0.nyroc.rr.com> <de2hup$qgu$1@ruby.cit.cornell.edu> <MPG.1d6f8fbf16f0c03c989930@news.mathworks.com> <ef11420.28@webx.raydaftYaTP>
Lines: 20
NNTP-Posting-Host: 213.16.162.86
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:297082


Dear John D'Errico,

                 Firstly,many thanks for your growdata function.I
have an algorithm tha need to create a large matrix by continously
appending vectos as rows to the final matrix.My first implementation
involving vertcat with cell arrays was rather slow in comparison to
yours.Some relults for the elapsed time:
Size of matrix A created--> 2114882 rows x 16 columns
My implementation gave about 3600 sec.
When I used your growdata for appending data (with a slight change to
the newrows=200000 instead of 20000 which you had),the elapsed time
was 310 sec.Of course this change is faster for numel(A)>2000000
in my case.
A suggestion,is tha you could integrate an if condition when the
maximum limit of the integer representation is reached,and pack the
memory.

Friendly,

Jim