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


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

Re: Manipulate with Matrices

Started bytkloecker@googlemail.com
First post2012-07-31 02:15 +0000
Last post2012-07-31 02:15 +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: Manipulate with Matrices tkloecker@googlemail.com - 2012-07-31 02:15 +0000

#11131 — Re: Manipulate with Matrices

Fromtkloecker@googlemail.com
Date2012-07-31 02:15 +0000
SubjectRe: Manipulate with Matrices
Message-ID<jv7f4b$1el$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
  ]
 ]

[toc] | [standalone]


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


csiph-web