MathGroup Archive 2003

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

Search the Archive

Re: Plot of Nonlinear function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40901] Re: Plot of Nonlinear function
  • From: "Bill Bertram" <wkb at ansto.gov.au>
  • Date: Wed, 23 Apr 2003 05:17:29 -0400 (EDT)
  • Organization: Australian Nuclear Science and Technology Organisation
  • References: <b8582c$5pj$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Jong Choi" <jxc91 at po.cwru.edu> wrote in message
news:b8582c$5pj$1 at smc.vnet.net...
> I want to plot this funcion with theta1 vs. theta2
>
>
> (theta1-pi/2) * Sin[theta1+theta2] - (theta2-pi/2) * (Sin[theta1] +
> Sin[theta1+theta2]) = 0
>
> this function is not linear.
> the values of x axis are theta1 and those of y axis are theta2.
> I think I have to solve this fuction first and then plot.

One possible approach is to define the function f[x, y] by the left hand
side of your equation ( with  x =theta1 and y=theta2). Then you can
numerically generate a table of values {x[[i]],y[[i]]} by using the FindRoot
function on f[x,y] ==0. Other people will undoubtedly give you a more
elegant proceedures but as an example, let

f[x_,y_] := (x-Pi/2)*Sin[x+y] - ... etc,

then

s = Table[{x, FindRoot[f[x, y] == 0, {y, 0}]]}, {x, -Pi/2, Pi/2, 0.1}]

xvalues = Transpose[s] [[1]]
yvalues  = y /. Transpose[s][[2]]
data = Transpose[xvalues,yvalues]

Then,

ListPlot[data, PlotJoined->True]

Will give you the result.




  • Prev by Date: Re: Plot of Nonlinear function
  • Next by Date: Re: another headache - log-log plot with error bars or separate plot markers
  • Previous by thread: Re: Plot of Nonlinear function
  • Next by thread: Re: Plot of Nonlinear function