Re: how to plot a 2-parametric output from Solve with
- To: mathgroup at smc.vnet.net
- Subject: [mg72536] Re: [mg72518] how to plot a 2-parametric output from Solve with
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 5 Jan 2007 02:18:13 -0500 (EST)
- Reply-to: hanlonr at cox.net
sol=Solve[{x==1+a*y,y==9+b*x},{x,y}]
{{x -> -((1 + 9*a)/(-1 + a*b)),
y -> -((9 + b)/(-1 + a*b))}}
sol11[a_,b_]=sol[[1,1,2]]
-((1 + 9*a)/(-1 + a*b))
sol12[a_,b_]=sol[[1,2,2]]
-((9 + b)/(-1 + a*b))
Plot3D[sol11[a,b],{a,-1/2,1/2},{b,-1/2,1/2}];
Plot3D[sol12[a,b],{a,-1/2,1/2},{b,-1/2,1/2}];
Bob Hanlon
---- "T.Sariyski" <tsariysk at verizon.net> wrote:
> Hi,
> I have an output from a Solve that returns a solution as a list of
> rules. Each branch of the solution is a two-parametric function e.g.
>
> {{ x -> Something(a,b), y->Something(a,b)},...
>
> I want to plot a specific branch of the solution with Plot3D as a
> function of {a,b}. I tried to assign a solution branch to a function
> sol11[a,b]
>
> sol11[a_,b_]=%[[1,1]]
>
> and to plot sol11 but it doesn't work. How can I access a parametric
> solution as returned from Solve as a function of it's parameters?
>
> Thanks, Ted