Path: news.mathworks.com!not-for-mail
From: "J Bell" <superblindman@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: undefined variable error message
Date: Tue, 23 Mar 2010 00:22:23 +0000 (UTC)
Organization: BYU
Lines: 22
Message-ID: <ho91ju$mhg$1@fred.mathworks.com>
Reply-To: "J Bell" <superblindman@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1269303743 23088 172.30.248.35 (23 Mar 2010 00:22:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 23 Mar 2010 00:22:23 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2279163
Xref: news.mathworks.com comp.soft-sys.matlab:619199

This is my code:

function theVal = dumb(beta,Y,X)

err=Y-X*beta;
err=abs(err);
theVal=sum(err);

end

when I run it, I get the message

??? Input argument "Y" is undefined.

Error in ==> dumb at 3
err=Y-X*beta;

any help?

thanks

why does this error message appear in general?