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$>
References: <hc6rc3$4ji$>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: U2FsdGVkX1/0vSE8y7oarBej1nxuUKvizaRouB8u4pE1TReqazsCFKqjTtjx76Ofeqzd3noS6ZF8hK3retuLZ33VfSbucLY1ZWi0BQOMa1ZCyim4CD5tvQkB9JJrkNoeL/s62qLA/tGgx/q2eezZyw==
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 (Windows/20090812)
Xref: 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...