 |
|
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
| [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
|
|
|