MathGroup Archive 2011

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

Search the Archive

Re: Column vectors should be interpreted as simple lists where

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121354] Re: Column vectors should be interpreted as simple lists where
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Mon, 12 Sep 2011 04:20:28 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Reply-to: jfultz at wolfram.com

Responding to your various points...

Making Ctrl+, do what you want by default would be a bad idea.  We could create 
a column vector notation, but we'd have to be careful that it couldn't be 
visually confused with other legitimate notation.Just for kicks, I made a first 
cut at doing something like this...a button which pastes a notation that allows 
you to put in a column of things (i.e., you still press Ctrl+, inside the 
placeholder) and interpret them as a flat vector:

PasteButton[
 RawBoxes[
  TemplateBox[{"\[SelectionPlaceholder]"}, "ColumnVector", 
   DisplayFunction -> (RowBox[{StyleBox["[", FontWeight -> Plain], #1,
         StyleBox["]", FontWeight -> Plain]}] &), 
   InterpretationFunction -> (RowBox[{"Flatten", "[", #1, "]"}] &), 
   BaseStyle -> {SpanMaxSize -> Infinity}]]]

Making Input cells not be bold is easy, but without some other sort of style 
change, I think it would be pretty visually confusing.  Just Format->Edit 
Stylesheet and paste the following in at the end of the resulting stylesheet:

Commands to insert paired delimiters already exist.  See the Insert->Typesetting 
submenu, the "Matching..." menu items (which also shows you the keyboard 
shortcuts you can use).

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.


On Sat, 10 Sep 2011 07:29:13 -0400 (EDT), Christopher O. Young wrote:
> It's a nuisance not to be able to enter data for points in the most
> readable and intuitive form, i.e., as column vectors, without having to
> Flatten out each column vector.
>
> The best workaround I could come up with was to use the following to
> convert lists of points to lists of lists.
>
> It's good that we don't need to waste space with parentheses, though. We
> can just type in the column vectors as column arrays using Control-
> return. But it would be even better if there were something close to the
> regular square bracket notation, which is the accepted mathematical
> notation, and also takes less space-consuming than curved parentheses.
>
> If WRI could also stop insisting that all input is boldface, users could
> use the excellent, time-honored, intuitive notation of having bold-face
> for vectors and matrices and regular type for scalars.
>
> Would this be so hard to implement? Maybe slightly different square
> brackets could be used, accessible via holding down the option key.
>
> It would be also be a huge time-saver if there were a way to get bracket
> pairs via holding down the Control-key, say. I.e., Control-( would type a
> _pair_ of parentheses, Control-[ would type a pair of square brackets,
> etc.
>
> There's a picture at http://home.comcast.net/~cy56/ColumnVectors.png and a
> notebook at http://home.comcast.net/~cy56/ColumnVectorsAsPoints.nb .
>
> MF[x_] := Map[Flatten, x]
>
> Graphics[
> {
> {Directive[Thick, Gray],
> Line[Table[{
> {x},
> {Sin[x]}
> } , {x, 0, 6.3, 0.1}] // MF[#] &]},
>
> {Directive[Dashed, Blue],
> Line[{{
> {2},
> {0}
> } , {
> {2},
> {Sin[2]}
> } , {
> {0},
> {Sin[2]}
> }} // MF[#] &]},
>
> {Directive[PointSize[0.02], Blue],
> Point[ {
> {2},
> {Sin[2]}
> } ] // MF[#] &}
> },
> Axes -> True
> ]






  • Prev by Date: Re: execution model: Function vs. delayed execution
  • Next by Date: Problems in Nintegrate
  • Previous by thread: Re: Column vectors should be interpreted as simple lists where
  • Next by thread: Message window