So I have an expression (expr) to which I find the roots. I want to plot the roots as a function of the parameters in the expression. Here's what I do:l:=solve(expr,x);f[1]:=(d,e,f)->subs([a=d,b=e,c=f],l[1]);f[2]:=(d,e,f)->subs([a=d,b=e,c=f],l[2]);with(plots):plot3d(f[1](1,x,y),x=0..2,y=0..2);This is total crap as it takes like 2 minutes and about 200 MB of RAM to generate the plot. How can I create a function from the output of solve() without using subs()? I need to perform this for a variety of 'expr' expressions, whose roots are very complicated. I do not want to retype the output from solve() into the function definitions each time I change 'expr'.P.S. No, "f[1]:=(a,b,c)->l[1];" does not work. It appears the type of l[1] does not agree with what the function assignment expects as input, or it's using a reference to the l[1] object instead of its value.
9/13/2007 5:32:37 PM
I suspect it would be easier to do this in matlab with some hearty loops?
9/17/2007 11:13:15 PM
you can't do it discretely?
9/17/2007 11:20:59 PM
^^ matlab can not provide the algebraic solution acquired in the first line^if you're talking about n iterative numerical solution, that defeats the purpose of using a math package to solve the problem.]
9/18/2007 12:55:09 PM
surprising...numerical solvers are typically more robust than the symbolic ones in maple. you're trying to solve f(x)=0, where f is implicitly dependent on some parameter?
9/18/2007 10:02:17 PM