Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: Matrices as operators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123062] Re: Matrices as operators
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Tue, 22 Nov 2011 05:34:52 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <20684718.1421.1321782772955.JavaMail.root@m06>
  • Reply-to: drmajorbob at yahoo.com

Very nice.

Bobby

On Mon, 21 Nov 2011 03:26:44 -0600, David Park <djmpark at comcast.net> wrote:

> In this case there is a simple answer. Just use RotationMatrix.
>
> RotationMatrix[t]
>
> {{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}
>
> But if you had an operator that wasn't built in, then Presentations has a
> routine, PushOnto, that will push arguments onto specific forms and is  
> much
> more convenient than Through.
>
> << Presentations`
>
> {{Cos, -Sin}, {Sin, Cos}}[t];
> % // PushOnto[ {Sin, Cos}]
>
> {{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}
>
>
> David Park
> djmpark at comcast.net
> http://home.comcast.net/~djmpark/
>
>
>
> From: Chris Young [mailto:cy56 at comcast.net]
>
>
> I'd like to be able to abbreviate matrices such as rotation matrices so
> that I don't have to repeat the argument. This way I can pass in more
> complicated arguments and it also shows the structure of the
> transformation more clearly.
>
> Through[( {
>     {Cos, -Sin},
>     {Sin, Cos}
>    } )[=CE=B8]]
>
> will get me partway there:
>
> Out: {{Cos, -Sin}[=CE=B8], {Sin, Cos}[=CE=B8]}
>
> I have to apply Thread and Through again to finally get what I want:
>
> In: Thread[Through[{{Cos, -Sin}[=CE=B8], {Sin, Cos}[=CE=B8]}]]
>
> Out: {{Cos[=CE=B8], (-Sin)[=CE=B8]}, {Sin[=CE=B8], Cos[=CE=B8]}}
>
> Is there a shortcut way to do this all in one step?
>
> Thanks very much for any help.
>
> Chris Young
> cy56 at comcast.net
>
>
>
>
>


-- 
DrMajorBob at yahoo.com



  • Prev by Date: Re: Loop problem
  • Next by Date: Re: How to do quickest
  • Previous by thread: Re: Matrices as operators
  • Next by thread: Re: Matrices as operators