Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: function
Date: Fri, 12 Mar 2010 00:35:21 +0000 (UTC)
Organization: Allergan
Lines: 11
Message-ID: <hnc289$slr$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1268354121 29371 172.30.248.37 (12 Mar 2010 00:35:21 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 12 Mar 2010 00:35:21 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2227092
Xref: news.mathworks.com comp.soft-sys.matlab:616117

Hi, I recently downloaded Matlab and have the following problem

If I code a simple code on function, e.g. "function y=poly(x,a)"

Matlab gives me an error message

"Error: Function definitions are not permitted at the prompt or in scripts."

Can anyone please let me know as to what is happening?? Any help is deeply appreciated.

Thanks