Subject: Graphing a function for several parameter values
From: Patrick Blanchenay
Date: Mon, 13 Feb 2012 12:17:48 +0000
Dear list members,
I am a somewhat beginner at Maxima, so please excuse me if my question
is stupid.
I would like to plot a function several times for different values of
parameters.
The function depends on a set of parameters, say paramOne and paramTwo.
I would like to be able to specify several sets of those parameters, and
for each set, get the function graphed.
I do not want the number of parameter sets to be hard-coded, so I
thought about using a for ... in ... do loop. This is what I tried, but
it doesn't seem to work:
parametersList: [
[paramOne=valueOne, paramTwo=valueTwo],
[paramOne=valueThree, paramTwo=valueFour],
]$
for parameterSet in parametersList do
block(
i++,
functionList[i] : ev(function(x,paramOne,paramTwo),parameterSet),
return functionList
)
wxplot2d(functionList,[x,0,1])$
Any suggestions?
Thank you!
Patrick
PS: this was cross-posted on StackOverflow.