Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10953

Re: Could someone else verify that an example from the Numerical

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Could someone else verify that an example from the Numerical
Date 2012-07-16 09:00 +0000
Message-ID <ju0l7t$kvt$1@smc.vnet.net> (permalink)
References <jttv31$gut$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On 7/15/2012 3:30 AM, W Craig Carter wrote:

<snip>

Ah! But you changed the code from the pdf file !

You wrote

> GraphicsGrid[Partition[Table[
>     NDSolve`Iterate[state, tau];
>     Plot3D[
>      Evaluate[
>       u[tau, x, y] /.
>        NDSolve`ProcessSolutions[state, "Forward"]], {x, -L, L}, {y, -L,
>        L}, PlotRange -> {-1/4, 1/4}],
>     {tau, 0, 20, 5}], 2]]
>

Notice the limit you have on the tau. You wrote

       {tau, 0, 20, 5}

while it should be

       {tau, 0, 20., 5.}

This is very important here, due to the replacement rule above
that wants to pattern match a solution obtained from NDSolve`ProcessSolutions
which will be numeric! Hence, what happened is that no match was
found and that is why the plots were coming out empty.

If you just change this line and put a "." there, it will work :)

regards,
--Nasser

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Could someone else verify that an example from the Numerical Solutions to Differential Equations isn't working. W Craig Carter <ccarter@MIT.EDU> - 2012-07-15 08:30 +0000
  Re: Could someone else verify that an example from the Numerical Roland Franzius <roland.franzius@uos.de> - 2012-07-16 03:45 +0000
  Re: Could someone else verify that an example from the Numerical "Nasser M. Abbasi" <nma@12000.org> - 2012-07-16 09:00 +0000
  Re: Could someone else verify that an example from the Numerical W Craig Carter <ccarter@MIT.EDU> - 2012-07-17 05:32 +0000

csiph-web