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


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

Re: Matrices as operators

Started byBob Hanlon <hanlonr357@gmail.com>
First post2011-11-21 09:25 +0000
Last post2011-11-21 09:25 +0000
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Matrices as operators Bob Hanlon <hanlonr357@gmail.com> - 2011-11-21 09:25 +0000

#6572 — Re: Matrices as operators

FromBob Hanlon <hanlonr357@gmail.com>
Date2011-11-21 09:25 +0000
SubjectRe: Matrices as operators
Message-ID<jad5dl$e9n$1@smc.vnet.net>
Define a function

rMatrix = {{Cos[#], -Sin[#]}, {Sin[#], Cos[#]}} &;

rMatrix[t]

{{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}

or just use the built-in function

RotationMatrix[t]

{{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}

% == %%

True


Bob Hanlon


On Sun, Nov 20, 2011 at 5:34 AM, Chris Young <cy56@comcast.net> wrote:
> 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}
>   } )[=E8]]
>
> will get me partway there:
>
> Out: {{Cos, -Sin}[=E8], {Sin, Cos}[=E8]}
>
> I have to apply Thread and Through again to finally get what I want:
>
> In: Thread[Through[{{Cos, -Sin}[=E8], {Sin, Cos}[=E8]}]]
>
> Out: {{Cos[=E8], (-Sin)[=E8]}, {Sin[=E8], Cos[=E8]}}
>
> Is there a shortcut way to do this all in one step?
>
> Thanks very much for any help.
>
> Chris Young
> cy56@comcast.net
>

[toc] | [standalone]


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


csiph-web