MathGroup Archive 2004

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

Search the Archive

Re: Creating my own cell


Hi,

Clear[makeIR]
SetAttributes[makeIR, HoldAll]

makeIR[gar_, numberOfRows_] := Module[{qar, lst},
    lst = 
      Prepend[Table[{"\[Placeholder]", 
            "\[Placeholder]"}, {numberOfRows - 
              1}], {\[SelectionPlaceholder], \[Placeholder]}];
    CellPrint[
      Cell[BoxData[
          RowBox[{ToString[Unevaluated[gar]], "=", 
              RowBox[{"(", GridBox[lst], ")"}]}]], "Input"]]
    ]


Regards
  Jens

"Flurchick, Kenneth M" wrote:
> 
> GentleBeings
> Trying to create a cell with a variable assigned to the matrix
> I have tried this but no assignemnt (Also lookscumbersome)
> 
> makeIR[numberOfRows_] :=
>   Module[{qar},
>     StylePrint[Set[ qar,
>         MatrixForm[
>           Partition[
>             Flatten[
>               Insert[
>                 Table[{   \[Placeholder]  ,   \[Placeholder]  }, {
>             numberOfRows - 1}],
>                  {\[SelectionPlaceholder], \[Placeholder]}, 1
>                 ]
>               ], 2
>             ]
>           ]], "Input"
>       ]
>     ]
> 
> I want to pass in the number of rows and make the 2D matrix for
> a user to fill in
> I want to position the current selection to the first placeholder.
> Any suggestions are desperately needed, this is just over my ability.
> kenf


  • Prev by Date: Re: Fourier Transform Spectroscopy w/ Mathematica
  • Next by Date: Re: DSolve change in v5 -- undocumented error message
  • Previous by thread: Re: Creating my own cell
  • Next by thread: RE: Re: Creating my own cell