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] Re: Question about programming maple with graphic commands

Search email archive for  

[MUG] Re: Question about programming maple with graphic commands
Author: Raphael Giromini    Posted: Wed, 16 Oct 2002 01:42:25 +0200

>> From: Raphael Giromini "raph"

Hi MUG-Users,

Emrah AKYAR worte :
>My source code is like:
> > main:=proc()
> > local data,x,y;
> > data:=[]:
>...
> > while ... do
> > x:=evalf(...):
> > y:=evalf(...):
> > data := [ op(data), [x, y] ];
> > od:


One way to simplify your code is to do:

data:=NULL;
while ... do
x:=evalf(...):
y:=evalf(...):
data:= data, [x,y];
od:
plot([data]);


--
Raphael Giromini. -+- http://www.giromini.org/maple/
Universite Paris 7 - Denis Diderot, France.

[MUG] Re: Question about programming maple with graphic commands
Author: Emrah Akyar    Posted: Mon, 21 Oct 2002 09:21:31 +0300

>> From: "Emrah Akyar" "eakyar"

Thanks Raphael,
It is realy simplfying my code :-)
But I want to use plot command between the
while ... do
...
od
commands. Is it possible?
Thanks...
Emrah AKYAR

-----Original Message-----
>> From: Raphael Giromini "raph"

Hi MUG-Users,

Emrah AKYAR worte :
>My source code is like:
> > main:=proc()
> > local data,x,y;
> > data:=[]:
>...
> > while ... do
> > x:=evalf(...):
> > y:=evalf(...):
> > data := [ op(data), [x, y] ];
> > od:


One way to simplify your code is to do:

data:=NULL;
while ... do
x:=evalf(...):
y:=evalf(...):
data:= data, [x,y];
od:
plot([data]);


--
Raphael Giromini. -+- http://www.giromini.org/maple/
Universite Paris 7 - Denis Diderot, France.

[MUG] Re: Question about programming maple with graphic commands
Author: Maple User Group    Posted: Thu, 24 Oct 2002 14:10:51 -0400

>> From: Maple User Group "maple_gr"

On Mon, 21 Oct 2002, Emrah Akyar wrote:
| But I want to use plot command between the
| while ... do
| ...
| od
| commands. Is it possible?

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

From: "Dr Francis J. Wright" "F.J.Wright"
To: "eakyar"
Subject: Question about programming maple with graphic commands
Date: Tue, 22 Oct 2002 17:24:42 +0100

Inside a loop you need to use print(plot(...)) in order to see all the plot
output reliably. This is because plot just returns a plot data structure
and does not actually do any plotting; the print forces the value returned
by plot to be displayed.

Francis


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Tue, 22 Oct 2002 10:58:08 -0700 (PDT)
From: Robert Israel "israel"
To: "maple-list"
Subject: Question about programming maple with graphic commands


> But I want to use plot command between the
> while ... do
> ...
> od
> commands. Is it possible?

Yes, it is. The one pitfall if you are using plot in
a procedure or nested loops is that plot doesn't automatically
put its output on the screen; as in most other commands, the output
will not normally be visible if the command is inside a nested loop
or inside a procedure (and not producing the return value of the
procedure). To make sure that you do see the output, you can use
print(plot(...)).

Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2




-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-

Date: Thu, 24 Oct 2002 14:08:18 +0200
To: "maple-list"
Subject: Question about programming maple with graphic commands
From: "rg" (Raphael Giromini)

Hi,

Just add a "print(plot([data])" between the "do" and the "od".

--
Raphael Giromini. -+- http://www.giromini.org/maple/
Universite Paris 7 - Denis Diderot, France.

Previous by date: [MUG] Maple and PseudoRandomGenerator, Jerome BENOIT
Next by date: [MUG] bug in Map ?, Jean Brillet
Previous thread: [MUG] Crashing in Maple 7 for Linux when removing output, Peter Schwenk
Next thread: [MUG] bug in Map ?, Jean Brillet



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