Subject: Graphing a function for several parameter values
From: Patrick Blanchenay
Date: Mon, 13 Feb 2012 16:20:53 +0000
Je la 13/02/2012 14:36, Jaime Villate skribis:
> I recommend that you use makelist() to create your list of functions.
> Something like this:
>
> (%i2) f (x,A,w):= A*sin(w*x)$
>
> (%i3) plist: [ [p1=1, p2=2], [p1=3, p2=4] ]$
>
> (%i4) flist: makelist ( ev(f(x,p1,p2), p), p, plist);
>
> (%o4) [sin(2*x),3*sin(4*x)]
> (%i5) plot2d ( flist, [x, 0, 7]);
>
Thank you very much Jaime,
Do you know if I could apply the substitution of parameters to several
functions?
E.g. something like:
flist: makelist ( concat(ev(f(x,p1,p2), p),",",ev(g(x,p1,p2), p)), p,
plist);
plot2d ( flist, [x, 0, 7]);
I have no idea, but basically i'd like to plot two functions for several
parameters values, so I need to have them like
[f(under param_set1), g(under param_set1), f(under param_set2), g(under
param_set2)]
Is this still feasible with makelist?
Thank you again!
Patrick