Path: news.mathworks.com!not-for-mail
From: "Ben Hinkle" <bhinkle@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Extended Symbolic Toolbox, code not working under new versions
Date: Mon, 7 Apr 2008 13:22:30 -0400
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <ftdl8l$htc$1@fred.mathworks.com>
References: <ftcsat$gtm$1@fred.mathworks.com> <ftdj0r$4p5$1@fred.mathworks.com>
Reply-To: "Ben Hinkle" <bhinkle@mathworks.com>
NNTP-Posting-Host: hinkleb.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1207588949 18348 172.31.57.121 (7 Apr 2008 17:22:29 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 7 Apr 2008 17:22:29 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:461561



"Steven Lord" <slord@mathworks.com> wrote in message 
news:ftdj0r$4p5$1@fred.mathworks.com...
>
> "Dingyu Xue" <xuedingyu@mail.neu.edu.cn> wrote in message 
> news:ftcsat$gtm$1@fred.mathworks.com...
>> The following codes used to run in earlier versions, but now
>> it is not working under 2007b, 2008a
>>
>> maple('with(numtheory):'); f=maple(['cfe:=cfrac(pi,20)'])
>> n=maple('nthnumer','cfe',4); d=maple('nthdenom','cfe',4)
>
> I haven't investigated to determine what changed, but if you're trying to 
> work with the continued fraction for the constant pi, and not the number 
> theory function pi(n), try replacing 'pi' in your MAPLE call that creates 
> f with 'Pi'.

Maple changes the way in which aliases are used between Maple 8 (which was 
the Maple version used prior to R2007b) and Maple 10. After executing 
'with(numtheory)' the name 'pi' no longer is aliased to Pi as is usually the 
case with the Symbolic Math Toolbox. Instead pi means numtheory:-pi. An 
alternative to Steve's solution is to not import numtheory and instead write 
out numtheory:-cfrac, numtheory:-nthnumer and numtheory:-nthdenom.

Hope that help,
-Ben