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


Groups > comp.soft-sys.math.mathematica > #4284 > unrolled thread

Re: Some questions about a Mathematica script

Started byBill Rowe <readnews@sbcglobal.net>
First post2011-08-10 10:57 +0000
Last post2011-08-10 10:57 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Some questions about a Mathematica script Bill Rowe <readnews@sbcglobal.net> - 2011-08-10 10:57 +0000

#4284 — Re: Some questions about a Mathematica script

FromBill Rowe <readnews@sbcglobal.net>
Date2011-08-10 10:57 +0000
SubjectRe: Some questions about a Mathematica script
Message-ID<j1to76$pt9$1@smc.vnet.net>
On 8/9/11 at 7:21 AM, dale.jenkins8@deletegooglemail.com (DaleJenk)
wrote:

refering to:

>soln = NDSolve[{{x1''[t] == dx1, x2''[t] == dx2,
>x3''[t] == dx3}, {x1[0] == x1int, x1'[0] == 0.0, x2[0] == x2int,
>x2'[0] == 0.0, x3[0] == x3int, x3'[0] == 0.0}}, {x1[t], x2[t],
>x3[t], x1'[t], x2'[t], x3'[t]}, {t, 0, 5},
>Method -> "StiffnessSwitching"];

>1. At the end of the NDSolve instruction comes the list: {x1[t],
>x2[t], x3[t], x1'[t], x2'[t], x3'[t]}. What exactly is the reason
>for putting in the primed items in this list?

The arguments to NDSolve are a list of equations, a list of
functions you want solutions for and finally a list showing the
independent variable and the range over which you want a
solution. The specific call to NDSolve you copies as a list of
second order differential equations. So, the second list with
{x1[t], ... x1'[t] ...} is telling NDSolve to return both the
function x[1t] and its derivative x1'[t]. The prime in x1'[t] is
a notation indicating a derivative.

>2. "soln" and "solnx1", etc. are all just labels. Right?

No, these are not just labels. They are symbols that get
assigned values.

>3. But what exactly does soln[[1,1]] refer to?

NDSolve is returning a list of things that are stored in soln.
The [[1,1]] portion specifies which element of soln is wanted.
In this case, [[1,1]] refers to the first element of the first
list stored in soln.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web