Thread Subject: Extended Symbolic Toolbox, code not working under new versions

Subject: Extended Symbolic Toolbox, code not working under new versions

From: Dingyu Xue

Date: 7 Apr, 2008 10:17:01

Message: 1 of 4

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)

Subject: Extended Symbolic Toolbox, code not working under new versions

From: Steven Lord

Date: 7 Apr, 2008 16:44:10

Message: 2 of 4


"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'.

--
Steve Lord
slord@mathworks.com


Subject: Extended Symbolic Toolbox, code not working under new versions

From: Ben Hinkle

Date: 7 Apr, 2008 17:22:30

Message: 3 of 4

"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


Subject: Extended Symbolic Toolbox, code not working under new versions

From: Dingyu Xue

Date: 7 Apr, 2008 23:23:03

Message: 4 of 4

"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

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com