From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Why does everyone hate 'eval'?
Date: Sun, 14 Dec 2008 08:00:07 +0000 (UTC)
Organization: NTNU
Lines: 22
Message-ID: <gi2ee7$3or$>
References: <ghrlim$oqo$> <ghv5ut$fj7$> <>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1229241607 3867 (14 Dec 2008 08:00:07 GMT)
NNTP-Posting-Date: Sun, 14 Dec 2008 08:00:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 651407
Xref: comp.soft-sys.matlab:506829

Praetorian <> wrote in message <>...
> > Is this an answer to my question? As you can see for yourself your approa=
> ch doesn't work, like I said.
> >
> > ?yvind
> What do you mean it doesn't work? I retrieved the metaclass
> information for a class whose name was stored in a string variable
> without using EVAL. Isn't that what you wanted? Anyway, Doug has a
> solution that doesn't even require string concatenation.

No, you retrieved a metaclass object for the 'char' class. This is the expected behaviour when you input a string to metaclass(). Compare the output of 
>> metaclass('?memmapfile')
>> ?memmapfile
'?memmapfile' is a char object, that's the point here.

Thanks, Doug! That's the solution. Support told me there was no way around using eval here.

Well, another use of eval knocked down.