Path: news.mathworks.com!not-for-mail
From: "Jos " <DELjos@jasenDEL.nl>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matlab code doesnt work
Date: Tue, 18 Dec 2007 22:00:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <fk9ft9$inv$1@fred.mathworks.com>
References: <fk2h5p$fa5$1@fred.mathworks.com> <10642267.1198014032538.JavaMail.jakarta@nitrogen.mathforum.org>
Reply-To: "Jos " <DELjos@jasenDEL.nl>
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 1198015209 19199 172.30.248.35 (18 Dec 2007 22:00:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 18 Dec 2007 22:00:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 870065
Xref: news.mathworks.com comp.soft-sys.matlab:442949


kaancho <kaancho12@hotmail.com> wrote in message 
<10642267.1198014032538.JavaMail.jakarta@nitrogen.mathforum.
org>...
> thanks for all the replies. The code indeed works. For 
some reason when i had to close matlab and restart it to 
take the data properly...maybe like Roger said I need to 
initialize the array.


You should not need to close matlab. Issueing a "clear ret" 
or even better (!) pre-allocate ret to it's final size 
(i.e., initializing) should do.

The error you get is similar to

a = ones(3,2) ;
a(1,:) = 1:10 ;

Jos