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

MathGroup Archive 2010

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

Search the Archive

Re: Manipulate with Matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113640] Re: Manipulate with Matrices
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 5 Nov 2010 05:14:28 -0500 (EST)

Perhaps something similar to this

matrices = {
   IdentityMatrix[5],
   ConstantArray[1, {5, 5}],
   ConstantArray[a, {5, 5}]};

labels = CharacterRange["a",
   FromCharacterCode[ToCharacterCode["a"] +
     Length[matrices] - 1]];

Manipulate[
 Column[{TraditionalForm[
    Row[Thread[labels == matrices], ","]],
   "",
   "Det[" <> nn <> "] = " <> 
    ToString[Det[matrices[[
        Position[labels, nn][[1, 1]]]]]]}],
 {nn, labels}]


Bob Hanlon

---- Jay <jaiezee at gmail.com> wrote: 

=============
I would like to use Manipulate on matrices. For instance, allow the 
user to choose elements of a 50 by 50 matrix, and Manipulate shows the 
dynamic inverse or transpose or determinant or whatever of the so 
manipulated matrix. But I do not wish to specify ranges for the 2500 
elements separately, but rather using matrices as objects.

For instance, I would like the user to choose a 5 by 5 matrix, whereby 
the range goes from the zero matrix to the matrix with all elements 
equal to 100, with initial matrix the identity matrix:

Manipulate[
 Det[nn], {{nn, IdentityMatrix[5]}, ConstantArray[0, {5, 5}], 
  ConstantArray[100, {5, 5}]}]


How can this be accomplished? How do I tell Mathematica that nn is a 5 
by 5 matrix to start with? I would have hoped that the
initial value shows it is a 5 by 5 matrix, but I think that does not 
work quite so automatically.

In that sense, neither the following works,

Manipulate[FullSimplify[Det[Array[nn, {5, 5}]]], {nn}]

Any help much appreciated!

Jay



--

Bob Hanlon



  • Prev by Date: Re: Graphics3D default lighting?
  • Next by Date: Re: Balance point of a solid
  • Previous by thread: Manipulate with Matrices
  • Next by thread: Re: Manipulate with Matrices