Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Function handle Problem
Date: Wed, 4 Nov 2009 16:07:01 +0000 (UTC)
Organization: Xoran Technologies
Lines: 22
Message-ID: <hcs8r4$43m$1@fred.mathworks.com>
References: <hcs617$2d9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257350821 4214 172.30.248.37 (4 Nov 2009 16:07:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 16:07:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:582427


"Rajeev Narayanan" <rite2rajeev@gmail.com> wrote in message <hcs617$2d9$1@fred.mathworks.com>...
> Hi,
> 
> I have created the following function and need to be passed as a function handle and i am getting some errors. The parameters T and alpha are not visible in my Top.m. 
=====

Why should they be visible? There is nothing in your code below to indicate that T and alpha are generated inside Top.m


> % FileName Parameter.m
> function[T, alpha] = Parameter()
> T = 0.000001; 
> alpha = 0.004;
> end
> 
> %FileName Top.m
> 
> fhandle = @Parameter
> Q = myfunc(fhandle)
> 
> Thanks,
> Rajeev