MathGroup Archive 2004

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

Search the Archive

Re: LogLog plot of NDSolve solution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52598] Re: [mg52557] LogLog plot of NDSolve solution
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 3 Dec 2004 03:54:28 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Adam,

How can you make a LogLog plot over that domain since your function is
negative for
x < 0.8 (approximately)? The Log of negative numbers gives complex values
and Mathematics objects to plotting them.

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

From: Adam Getchell [mailto:agetchell at physics.ucdavis.edu]
To: mathgroup at smc.vnet.net

Hello all,

I'm solving an ODE via NDSolve (neutron abundance for Big Bang
Nucleosynthesis -- from "Modern Cosmology", S. Dodelson). The result
comes out as an InterpolatingFunction, which plots fine using Plot.
However, if I wish to do a Log-Log plot, neither LogLogPlot nor
LogLogListPlot work. What am I missing?

\!\(Dodelson := \(\[CapitalChi]'\)[
        x] - \(x\/H\) \(255\/\(\(\[Tau]\_n\) x\^5\)\) \((12 + 6  x +
            x\^2)\) \((\[ExponentialE]\^\(-x\) - \[CapitalChi][
                x] \((1 + \[ExponentialE]\^\(-x\))\))\)\)

In[329]:=
\!\(\(\(\[IndentingNewLine]\)\(ans =
    NDSolve[{Dodelson \[Equal]
            0 /. {H \[Rule] 1.13, \[Tau]\_n \[Rule] 886.7}, \[CapitalChi][
            1.293] \[Equal]  .25}, \[CapitalChi], {x,  .1, 1.3},
      MaxSteps \[Rule] 10\^6]\)\)\)

Using the Evaluate trick suggested by
http://www.nhn.ou.edu/~morrison/Mathematica/TipSheets/2Dgraphics.pdf
doesn't work.

This example doesn't cover LogLogPlots:
http://documents.wolfram.com/v4/MainBook/3.8.2.html

Other search results on Google haven't turned up anything so far.

Thanks,

--Adam Getchell





  • Prev by Date: Re: Package functionality moved to kernel
  • Next by Date: Re: Another Integrate error
  • Previous by thread: Re: LogLog plot of NDSolve solution
  • Next by thread: Re: LogLog plot of NDSolve solution