First of all, I'd recommend using 'subst' rather than 'ev' (which can have
surprising effects).
You can do something as simple as
vals: [a=1,b=2,c=3]$
The expressions can be kept in a list, e.g.
exprs:[expr1,expr2,expr3]$
qqq: subst(vals,exprs)
which returns a list of length 3; the values are qqq[1] etc.
You could also use an array, e.g.
for i thru length(exprs) do ar[i]: exprs[i]$
makelist(subst(vals,ar[i]),i,1,3)
You can see that the x[y] notation applies both to lists and to arrays.
-s
On Sat, Dec 1, 2012 at 4:37 PM, foelsche at sbcglobal.net <
foelsche at sbcglobal.net> wrote:
> I want to evaluate certain expressions by assuming that some variables
> have certain numeric values.
> So -- this are more than one expression and more than one
> variable-value-pair.
> How to can I avoid writing the variable-value pairs multiple times?
>
> I was thinking of something like this:
>
> values1:[a=1, b=2, c=3]$
>
> ev(expr1, values1)$
> ev(expr2, values1)$
> ev(expr3, values1)$
>
> Thanks
> Peter
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>