Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Vector Math vs For Loop
Date: Tue, 17 Nov 2009 21:48:03 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 7
Message-ID: <hdv5mj$22n$1@fred.mathworks.com>
References: <hdv4n7$la$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1258494483 2135 172.30.248.35 (17 Nov 2009 21:48:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Nov 2009 21:48:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:585952


rand(1000) is not a vector.  

Your code will error with 
"In assignment A(I) = B, the number of elements in B and
 I must be the same."

If you post an working For loop, complete with numeric inputs, then you may get a better answer.