MathGroup Archive 2001

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

Search the Archive

Re: SetDelayed problems with matrix operation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27369] Re: SetDelayed problems with matrix operation
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Thu, 22 Feb 2001 02:25:13 -0500 (EST)
  • References: <96vv3k$ks@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Sanchez,

You need Set instead of SetDelayed:

{ x1[t_], x2[t_], x3[t_]} = MatrixExp[A t].{b1, 0, 0}

The problem is that with

{ x1[t_], x2[t_], x3[t_]} := MatrixExp[A t].{b1, 0, 0}

The right side is not evaluated and so when Mathematica tries to store the
assignment it finds that the two side are not the same shape -- just as the
message says.

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"SANCHEZ DE LEON, Guillermo" <gsl at fab.enusa.es> wrote in message
news:96vv3k$ks at smc.vnet.net...
> Given a square matrix such as
>
> A={{-3, 0, 0.05}, {0.8, -0.01, 0}, {0, 0.01, -0.05}}
>
> I wish evalute the expresion:
>
> { x1[t_], x2[t_], x3[t_]} : = MatrixExp[A t].{b1, 0, 0}
>
> I receive the message
>
> SetDelayed::"shape": "Lists{ x1[t_], x2[t_], x3[t_] } and  MatrixExp[A t)]


  • Prev by Date: Re: PALETTE
  • Next by Date: Re: desperate, please help.
  • Previous by thread: Re: SetDelayed problems with matrix operation
  • Next by thread: Re: SetDelayed problems with matrix operation