From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: objects containing functions
Date: Mon, 29 Mar 2010 17:53:05 +0000 (UTC)
Organization: CSHL
Lines: 11
Message-ID: <hoqpe1$nve$>
References: <hoqo8l$4vl$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1269885185 24558 (29 Mar 2010 17:53:05 GMT)
NNTP-Posting-Date: Mon, 29 Mar 2010 17:53:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1739148
Xref: comp.soft-sys.matlab:621599

> Any suggestions how I could do this better - i.e. ways of defining f within the object, but so it is as fast to evaluate as if it were a separate function?
> Thanks, S

I don't know exactly what you mean by an "in-line function" in this case. You mean you created a function handle or that you've defined a sub-function within another function?

The last few releases of Matlab have made it very easy to create object properties.
I've used this for problems in the psat  but haven't bench-marked it. In earlier versions you had to put your functions into a funny "@myObject" directory. Never used those.