Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Empty array gets added to. (Or not)
Date: Fri, 16 Oct 2009 09:56:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <hb9fvj$i37$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1255686963 18535 172.30.248.38 (16 Oct 2009 09:56:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Oct 2009 09:56:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1293002
Xref: news.mathworks.com comp.soft-sys.matlab:577777


Hi.

I discovered that 

a=[];
b=4;
a=a+b;

will not yield an error message as would

a = a+4;

(without first assigning a). Yet it also does not give a=4... I knew that Nan+4 =NaN, but why is []+4=[] ? Is there more 'black hole beahviour' i should know about?

Thank you.

Andr