 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] programming a table
| [MUG] programming a table |
|
Author: Herg2770
Posted: 26/10/2000 02:45:50 GDT
|
>> From:
Hi,
I am currently in the process of writing a program in Maple to add points of
an elliptic curve over a finite field, and I am having difficulty determining
how to organize my output as a table. I have tried using the array command
but was unsuccessful as it only recognizes the last entry in the loop. Any
help would be most appreciated.
Thank you
|
| [MUG] Re: programming a table |
|
Author: Maple Group
Posted: 01/11/2000 15:07:33 GMT
|
>> From: Maple Group
On Wed, 25 Oct 2000 wrote:
|> I am currently in the process of writing a program in Maple to add
|> points of an elliptic curve over a finite field, and I am having
|> difficulty determining how to organize my output as a table. I have
|> tried using the array command but was unsuccessful as it only
|> recognizes the last entry in the loop. Any help would be most
|> appreciated.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Thu, 26 Oct 2000 15:04:00 -0700 (PDT)
From: Robert Israel
To:
Subject: programming a table
From this message it's very hard to figure out what your actual difficulty
is. In what way does it only recognize the last entry in the loop? The
usual way to put entries into either an array or table inside a loop
would be something like:
> for i from ... to ... do
...
T[i] := ...;
od;
This will automatically set up T as a table. If you want it to be an
array, set up the array first, something like
> T:= array(1..1000);
for i from ... to ... do
...
T[i] := ...;
od;
Robert Israel
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Mon, 30 Oct 2000 13:07:31 +0100
From: Barsuhn
Subject: programming a table
To:
A table is the most general random access data structure in Maple. It
will be created as soon as you assign to an indexed symbol. You may use
nearly everything as index expresssion (of course also simple numbers if
desired). The following statements show the creation of the table
My_Table containing some nonsense. The final statement eval(My_Table);
shows its contents and you see that there is not only the final entrance
present. Could it be that you positioned your assignment statement
behind the terminating clause of the loop (end do or od in previous
versions)?
< for i from -2 by 3 to 4 do
> for j in [red,green,blue] do
> for k in [10,100,x^2] do
> My_Table[i,j,k]:=i+j+k
> end do
> end do
> end do;
> eval(My_Table);
All the best Jurgen
--
-------------------
Prof. Dr. Jurgen Barsuhn
Fachhochschule Bielefeld
University of Applied Sciences
Fachbereich Elektrotechnik und Informationstechnik
Wilhelm-Bertelsmann-Str. 10
D-33602 Bielefeld
-----------
|
Previous by date: [MUG] rootof and allvalues, Don Hartig
Next by date: [MUG] Re: Bug in contourplot in Maple6, Maple Group
Previous thread: [MUG] smooth splines, Cesar Augusto De Freitas Anselmo
Next thread: [MUG] Bug in contourplot in Maple6., Carl Eberhart
|
|
|