From: Brian <brian1.thomas@ge.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: decrease in speed due to appending a row vector
Message-ID: <ef580c1.-1@webcrossing.raydaftYaTP>
Date: Thu, 24 May 2007 19:44:44 -0400
Lines: 7
NNTP-Posting-Host: 65.200.157.177
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:410964



I have a row vector and I am adding new data elements in between at
different locations. The approach i take is copy the vector in a
temporary variable, add the new element at the desired location and
then append the remaining elements from the temporary variable. I
believed it should be very fast in Matlab but if i repeat it 15000
times it takes me 10 seconds which is very slow for my application.
Is there any other way to get around this problem.