Path: news.mathworks.com!newsfeed-00.mathworks.com!oleane.net!oleane!news.ecp.fr!feeder.eternal-september.org!eternal-september.org!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Size-function and ";"
Date: Tue, 27 Oct 2009 08:20:37 -0500
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <hc6scn$cmv$1@news.eternal-september.org>
References: <hc6rc3$4ji$1@fred.mathworks.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.eternal-september.org U2FsdGVkX1/0vSE8y7oarBej1nxuUKvizaRouB8u4pE1TReqazsCFKqjTtjx76Ofeqzd3noS6ZF8hK3retuLZ33VfSbucLY1ZWi0BQOMa1ZCyim4CD5tvQkB9JJrkNoeL/s62qLA/tGgx/q2eezZyw==
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Tue, 27 Oct 2009 13:25:44 +0000 (UTC)
In-Reply-To: <HIDDEN>
X-Auth-Sender: U2FsdGVkX18AsXiPGfxlMqpnVUQ9Q7h3Y8IkH2PzLlE=
Cancel-Lock: sha1:WUpqvR6HXYiiIp2KkjfMn/idqiE=
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Xref: news.mathworks.com comp.soft-sys.matlab:580346

Adam Andersen L?ss?e wrote:
> I have this very annoying problem, that I have now encoutered a few times:
> 
> Excerpt of the code:
> ------
> ...
> for i=1:nelb
>     sys.T{i+nelb}= [i+1 i+nelb+1 i+nelb+2]  % ";" gives error?!
> end
> 
> size(sys.T,2)
> ------
> (some other stuff is before this, but this is what seems to be causing the problems.)
> 
> If the operation in the for-loop is ended with a ";" then
> "size(sys.T,2)" returns a value, as if the loop has not been run at
> all. If ";" is omitted it returns fine, but I of course have a very
> cluttered command window.
> 
> If I run the program with the ";" and then after the program has
> finished type "size(sys.T,2)" in the command window, it returns the
> proper result.
> 
> What is happening and how do I fix it?

Think you'll need to post a full example that demonstrates the problem 
w/o excerpting and trying to interpret the error messages.  You've 
"concised" it down too far...

--