Re: field line with NDSolve - attachment on www
- To: mathgroup at smc.vnet.net
- Subject: [mg58188] Re: field line with NDSolve - attachment on www
- From: Maxim <ab_def at prontomail.com>
- Date: Tue, 21 Jun 2005 06:03:32 -0400 (EDT)
- References: <d9397p$921$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Sun, 19 Jun 2005 08:09:29 +0000 (UTC), <topolog at gazeta.pl> wrote: > Hi Daniel and All > > Thank you for the example - I have checked and it works. Anyway, in > Mathematica4.0 my problem also can be solved but I moved to version > 5.1 and here it fails. (A person from the mathgroup minded me the > names of variables, eg. 'eqn_b', which I agree is misleading and of > course in my code appears as 'eqnb'). > > If I still may count on your help, on > http://www.astri.uni.torun.pl/~krix you will find files b.mx > (contains the whole vector b and values {xmax,ymin,ymax,zref}). and > a notebook b.nb (prepared to work with b.mx). The link is called > 'Temporary: MATHGROUP' (files are in an archive b.tar). > > I would like to remind, that the message I get (NDSolve::nlnum, see > my previous post) is not documented yet in 5.1. > > Thank you and regards > Rafal > If you temporarily disable $MessagePrePrint and evaluate Block[{$MessagePrePrint}, NDSolve[eqnbnd, r, {y, ymin, ymax}] ] you'll see that the error message is pretty self-explanatory: it complains about InterpolatingFunction[{{0., 3000.}}, <>][100. + 0.*I] being non-numerical. You can fix this by changing the definition of b: b = b /. InterpolatingFunction[s__] -> (InterpolatingFunction[s][Re[#]]&); Then NDSolve and Plot work fine. Better yet is to investigate where the imaginary values in b came from. Maxim Rytin m.r at inbox.ru