Adept Scientific - English
The world's best software for research, science and engineering.
flag arrow
clearclear
 

 Adept Store | register Join My Adept | Flags  
Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055  
UKusdedksvnofi
Home
Products
Training
Consultancy
 Buy Online
Downloads
Education
Support
My Adept
International |  About Us |  Contact Us |  Press Room |  Jobs


The Next Steps

• Ask us a question
• Maple Product Tour
• Buy Maple Now
• View Maple Pricing
• Find out about Online Training
• Download a Brochure
• Request a Brochure
• Download a Demo
• Request a Demo
• Meet Our Team
• Read our RSS Feeds

Learn More

Maple Home
Maple 11 Professional
Maple 11 Academic
Maple 11 Student Use
Recorded Online Seminars
FREE Training Resources


MapleNet
Maple T.A.
MapleConnect
BlockImporter for Simulink
BlockBuilder for Simulink
Maple Toolboxes
Maple Rave Reviews
Maple Study Guides
Books about Maple
System Requirements

View Maple 10 in Action
Product Comparison Chart

Latest Information

New Features: Professional
New Features: Academic
The Maple Reporter
The Maple Reporter Online
Numerical Algorithms Group
(NAG)


Service & Support

Maple 10 Training Videos
MaplePrimes, blogs, forums
Elite Maintenance Program
Application Centre
Powertools
Maple User Group (MUG)
Join the Maple User Group
(MUG)

Search the Knowledge Base
Technical Support request

List Archives >  Maple User Group List Archive >  Archive by date >  This Month By Date >  This Month By Topic

[MUG] nasty bug in odeplot with macos X

Search email archive for  

[MUG] nasty bug in odeplot with macos X
Author: Roberto Sussman    Posted: Sun, 08 Sep 2002 17:26:46 -0500

>> From: Roberto Sussman "sussky"

I found a nasty plot using Maple 7 with a Mac (G4 Tower 400 Mhz, Mac OS
X version 10.1). Since Maple is not native it runs under the "Classic"
Mac OS 9.2 emulation.

First I run the following simple commands related to solving numericaly
a system of two ODE's

> restart;
> eqMN:=(beta0,lambda0,x)->diff(M(x),x)=piecewise(x>0,
x^2*(exp(beta0-beta(x))+lambda0), x=0, 0);
> eqbN:=(lambda0,x)->diff(beta(x),x)=piecewise(x>0,
> (M(x)/x^2-lambda0*x)*beta(x), x=0, 0);
>
S0:=dsolve({eqMN(10^6,0,x),eqbN(0,x),M(0)=0,beta(0)=10^6},{M(x),beta(x)},type=
numeric);
> seq(S0(.5*i), i=1..5);
> plots[odeplot](S0,[x,log10(M(x))],0..2.5,color=black);

Up to this point everything is fine. But then, I want to redo the ODE's
with a different method, therefore I edit the dsolve commands adding
(say) "method = lsode" (the problem is independent of the method). I do
so and then re-run all the commands. It does the numerical solutions and
tabulates numerical values, but displays an error message as I try to
plot them with odeplot. The message is

Error, (in StringTools:-Remove) mapped expression must return `true'
or `false'

Though, you can obtain the plot by forming a list of lists with the
points by using instead of odeplot the command

plot([seq([i/10,log10(rhs(S0(i/10)[2]))], i=0..25)], color=black);

Afterwards, since I could not get any plot with odeplot I quit Maple
and tried to start a new session, but got the error message

"The application Maple has unexpectedly quit... etc"

Hence I had to force-quit the whole Classic environment. This annoying
bug does not happen if running the same commands under Mac OS 9.x.
Hopefuly the Mac OS X native version of Maple might come soon. I write
below the transcript of the Maple session (after re-executing the group
of commands)

Roberto Sussman


> restart;
> eqMN:=(beta0,lambda0,x)->diff(M(x),x)=piecewise(x>0,
> x^2*(exp(beta0-beta(x))+lambda0), x=0, 0);

eqMN := (beta0, lambda0, x) -> diff(M(x), x) = piecewise(0 < x,

2
x (exp(beta0 - beta(x)) + lambda0), x = 0, 0)

> eqbN:=(lambda0,x)->diff(beta(x),x)=piecewise(x>0,
> (M(x)/x^2-lambda0*x)*beta(x), x=0, 0);

eqbN := (lambda0, x) -> diff(beta(x), x) =

/M(x) \
piecewise(0 < x, |---- - lambda0 x| beta(x), x = 0, 0)
| 2 |
\ x /

>
> S0:=dsolve({eqMN(10^6,0,x),eqbN(0,x),M(0)=0,beta(0)=10^6},{M(x),beta(x
> )},type=numeric, method=lsode);

S0 := proc(x_lsode) ... end proc

> seq(S0(.5*i), i=1..5);

-5
[x = .5, M(x) = .107253635455685075 10 ,

7
beta(x) = .100001172170238756 10 ], [x = 1.0,

-5
M(x) = .207236310045923610 10 ,

7
beta(x) = .100001321418795199 10 ], [x = 1.5,

-5
M(x) = .300759851927367088 10 ,

7
beta(x) = .100001405604256631 10 ], [x = 2.0,

-5
M(x) = .391263046364007452 10 ,

7
beta(x) = .100001463943739084 10 ], [x = 2.5,

-5
M(x) = .480790975386358341 10 ,

7
beta(x) = .100001508190117218 10 ]

> plots[odeplot](S0,[x,log10(M(x))],0..2.5,color=black);
Error, (in StringTools:-Remove) mapped expression must return `true'
or `false'

> plot([seq([i/10,log10(rhs(S0(i/10)[2]))], i=0..25)], color=black);

>


%
%===================================================
% Dr Roberto A Sussman,
% Investigador Titular B,
% Instituto de Ciencias Nucleares,
% Circuito Exterior, CU, UNAM,
% Mexico DF, 04510
%
% tels: +52-55-56224690, 91, 92, fax: +52-55-56224693
% email: "sussman" & "sussky"
% web: http://www.nuclecu.unam.mx/~sussman
%===================================================

Previous by date: [MUG] Re: getting hold of exponents in ifactor, Maple User Group
Next by date: [MUG] Comparison of mathematical programs for data analysis, Thomas Schramm
Previous thread: [MUG] Maple problem (?),  Paul E S Wormer
Next thread: [MUG] Comparison of mathematical programs for data analysis, Thomas Schramm



Ready to buy?

Maple - single user licence
Add to shopping basket
$ 1,895.00
Upgrade to Maple 12 from v11
Add to shopping basket
$ 995.00
Upgrade to Maple 12 from v10 & below
Add to shopping basket
$ 1,395.00

Featured Downloads

Maple White Paper: Technical Knowledge - An Asset You Can Afford to Lose?
Maple in Electronics Application Pack
Maple in Robotics & Aerospace Application Pack
Maple in Finance Application Pack

Product Reviews

"Without the Maple software, we would have to spend weeks generating the equations of motion for every experiment. Then the chances that we did it right would basically be near zero. There would always be a mistake somewhere. It is very difficult to set up a dynamic motion model by hand."
- Jean-Claude PiedBeouf, Ph.D Manager of Robotics, Canadian Space Agency

"Its very good - highly accurate and easy to use. The speed of Maple allows me to change equations and quickly reintegrate them into the application, so more possibilities can be explored to achieve the precise effect desired."
Shawn Neely, Senior R & D Director for PDI/Dreamworks
adept

Top of the Page

Our Privacy and Terms and Conditions Statement
All Trademarks Recognised. Copyright © 2007, Adept Scientific plc.
Site designed and maintained by Adeptise

Adept Scientific | Amor Way | Letchworth Garden City | Herts | SG6 1ZA | Tel: +44 (0)1462 480055