Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: To plot solutions, FindRoot as a function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37380] Re: [mg37341] To plot solutions, FindRoot as a function
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Fri, 25 Oct 2002 02:48:44 -0400 (EDT)
  • References: <200210240655.CAA05094@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Well, yes, perhaps a bit too naive. Bear in mind that 1) a 3D plot needs
Plot3D; 2) The result of FindRoot is in the form of a rule wherefrom you
have to extract the actual value you need. Try this:

In[1]:=
sol[a_, b_] := FindRoot[a*Tanh[b*x] == x,
   {x, {0.01, 0.1}}]

In[2]:=
Plot3D[sol[a, b][[1,2]], {a, 1, 2}, {b, 1, 2}];

Tomas Garza
Mexico City

----- Original Message -----
From: "Veniamin Abalmassov" <V.Abalmassov at unibas.ch>
To: mathgroup at smc.vnet.net
Subject: [mg37380] [mg37341] To plot solutions, FindRoot as a function


> Hello,
>
> I'd like to plot the solution of an equation which depends on two
> parameters, e.g.
>
> a*Tanh[b*x] == x
>
> So, I'd like to see it in 3D, one axis is "a", other is "b", and the last
> is "solution".
>
> I've tried naively to do it as follows:
>
> sol[a_,b_]:=FindRoot[a*Tanh[b*x] == x, {x, {0.01, 0.1}}]
> Plot[sol[a,b], {a, 1, 2}, {b, 1, 2}]
>
> And it doesn't work. Help me, please. What can I do?
>
> Thanks a lot,
>
> Veniamin
>
>
>
>




  • Prev by Date: Off by 0.00000001, Why?
  • Next by Date: Re: Problem with user defined functions
  • Previous by thread: To plot solutions, FindRoot as a function
  • Next by thread: RE: To plot solutions, FindRoot as a function