You probably want to do.
for i from 1 thru 10 do (
(
p : i,
specificEquations : myEquations,
print(specificEquations)
);
In a program the syntax is a little different since commas indicate the end
of a statement (in a program).
Rich
-----Original Message-----
From: Michael Knudsen
Sent: Thursday, January 06, 2011 2:30 PM
To: maxima at math.utexas.edu
Subject: Body of For Loop
Hi,
I have a list of equations called myEquations, and they all depend on
a single parameter p. Using a command like
specificEquations : myEquations, p = 1;
one gets a new list, specificEquations, containing the original
equations with 1 substituted for the variable p. So far, so good!
However, if I try to do something similar in a for loop, something
strange happens.
for i from 1 thru 10 do (
(specificEquations : myEquations, p = i),
print(specificEquations)
);
Here all print statements yield the same output, which is just
myEquations with no value substituted for p.
What am I missing here? Thanks in advance!
Michael Knudsen
--
Michael Knudsen
micknudsen at gmail.com
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima