Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Creating my own cell

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46760] Re: Creating my own cell
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sun, 7 Mar 2004 01:33:38 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <c298v2$572$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

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