MathGroup Archive 2008

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

Search the Archive

Re: Mathematica syntax

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87911] Re: Mathematica syntax
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Sat, 19 Apr 2008 23:51:36 -0400 (EDT)
  • Organization: University of Bergen
  • References: <fuc7qs$a11$1@smc.vnet.net>

c.justin88 at gmail.com wrote:
> An error is yielded with the below segment:
> 
> l4**2*m1*phidd - l3**2*m2*psidd +
> - l1**2*m1*thdd + l4**2*m1*thdd + l2**2*m2*thdd +
> - l3**2*m2*thdd + (l1**2*mb*thdd)/3. -
> - (l1*l2*mb*thdd)/3. + (l2**2*mb*thdd)/3. -
> - l1*l4*m1*(phidd + 2*thdd)*Cos(phi) +
> - l2*l3*m2*(psidd - 2*thdd)*Cos(psi) +
> - l1*l4*m1*phid**2*Sin(phi) +
> - 2*l1*l4*m1*phid*thd*Sin(phi) -
> - l2*l3*m2*psid**2*Sin(psi) +
> - 2*l2*l3*m2*psid*thd*Sin(psi) -
> - g*l3*m2*Sin(psi - th) + g*l1*m1*Sin(th) -
> - g*l2*m2*Sin(th) + (g*l1*mb*Sin(th))/2. -
> - (g*l2*mb*Sin(th))/2. - g*l4*m1*Sin(phi + th).eq.0,
> l4*m1*(l4*phidd + l4*thdd - l1*thdd*Cos(phi) -
> - l1*thd**2*Sin(phi) - g*Sin(phi + th)).eq.0,
> l3*m2*(l3*psidd - l3*thdd + l2*thdd*Cos(psi) -
> - l2*thd**2*Sin(psi) + g*Sin(psi - th)).eq.0
> 
> (This is from a old version of Mathematica, I think v3)
> 
> It gives a syntax error and (psi) and (phi) are invalid.
> 
> What needs to be corrected? I'll post the whole notebook aftewards.
> 

This is not a Mathematica expression at all.  It is Fortran. 
Mathematica does not seem to support parsin FortranForm, so the 
expression needs to be rewritten manually.


  • Prev by Date: How to remove unneeded constraints
  • Next by Date: Re: How to solve this simple equation?
  • Previous by thread: Re: Mathematica syntax
  • Next by thread: Re: Mathematica syntax