MathGroup Archive 2012

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

Search the Archive

Re: Manipulate with Matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127507] Re: Manipulate with Matrices
  • From: tkloecker at googlemail.com
  • Date: Mon, 30 Jul 2012 22:13:57 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <iatt2b$egc$1@smc.vnet.net>


With[{rows = 3, cols = 3, fieldSize = 5},
 Manipulate[
  Column[{TableForm@arr, Row[{"det = ", Det[arr]}]}]
  , {arr, None}
  , {initialized, None}
  , Row[{"                        column"}]
  , Evaluate@With[{
     makeRow = Function[{rowIndex},
       Join[{Row[{rowIndex, Spacer[4]}]}, 
        Map[Function[{colIndex}, 
          InputField[Dynamic[arr[[rowIndex, colIndex]]], Number, 
           FieldSize -> fieldSize, Enabled -> True]], Range[cols]]]
       , HoldAll
       ]
     },
    Grid[Join[
      {Join[{"row"}, Range[cols]]}
      , Map[makeRow, Range[rows]]
      ]]
    ]
  , Initialization :> ( 
    If[Not[initialized === True], arr = Table[0, {rows}, {cols}]]; 
    initialized = True )
  , SaveDefinitions -> True
  ]
 ]




  • Prev by Date: How do I create a circular lamina?
  • Next by Date: Re: mac new OS "mountain lion", compile function,
  • Previous by thread: How do I create a circular lamina?
  • Next by thread: Fitting part of a List