MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Another plea for help...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39170] RE: [mg39161] Another plea for help...
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 2 Feb 2003 01:13:13 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Rob,

Try this.

result = Solve[{a == 1/(1/r2 + 1/50), 50 == 1/(1/(a + r1) + 1/r2)}, r1, a]

Plot[r1 /. result // Evaluate, {r2, -100, 100}];

You don't strictly need the Evaluate, but it is more efficient with it.

I would tend to do something more like the following.

Clear[r1]
result = Solve[{a == 1/(1/r2 + 1/50),
      50 == 1/(1/(a + r1) + 1/r2)}, r1, a][[1,1]];
r1[r2_] = r1 /. result

Plot[r1[r2], {r2, -100, 100}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


From: 1.156 [mailto:rob at piovere.com]
To: mathgroup at smc.vnet.net


I'd sure like to find out how to clean up a process I do a lot.  Namely, get
a solution to some set of equations and then plot the result. For example,
I recently did

result = Solve[{a == 1/(1/r2 + 1/50), 50 == 1/(1/(a + r1) + 1/r2)}, r1, a]

This gives {{r1 -> (a function of r2)  }}

Then, I plot it by
Plot[ (this function of r2), {r2, startvalue, stopvalue}]

where I carefully type in this function.  I feel sure you Mathematica pros
don't have to do that so I have made several feeble attempts to automate
this over the years. They fail because I still don't have a clue how
Mathematica works.

Here's my last attempt:
Plot[ result /. %]
Mathematica just hisses and prints out tons of error messages, none of which
mean
a thing to me.

Surely there is a way to get this plot without having to type the Solve[]
result
into Plot[].  Any hints would be appreciated, as usual.

Rob



  • Prev by Date: To verify Cauchy-Riemann relations in complex variable graphically
  • Next by Date: Re: Another plea for help...
  • Previous by thread: Re: RE: To verify Cauchy-Riemann relations in complex variable graphically
  • Next by thread: Re: Another plea for help...