Path: news.mathworks.com!not-for-mail
From: "Dingyu Xue" <xuedingyu@mail.neu.edu.cn>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Extended Symbolic Toolbox, code not working under new versions
Date: Mon, 7 Apr 2008 23:23:03 +0000 (UTC)
Organization: Northeastern Univ
Lines: 41
Message-ID: <fteacn$qc4$1@fred.mathworks.com>
References: <ftcsat$gtm$1@fred.mathworks.com> <ftdj0r$4p5$1@fred.mathworks.com> <ftdl8l$htc$1@fred.mathworks.com>
Reply-To: "Dingyu Xue" <xuedingyu@mail.neu.edu.cn>
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 1207610583 27012 172.30.248.37 (7 Apr 2008 23:23:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 7 Apr 2008 23:23:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 18133
Xref: news.mathworks.com comp.soft-sys.matlab:461621



"Ben Hinkle" <bhinkle@mathworks.com> wrote in message
<ftdl8l$htc$1@fred.mathworks.com>...
> "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
> 
> 
Thanks Ben, I found this by accident last night.  So why the
change?  It may confuse many Matlab users