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


Groups > comp.soft-sys.math.mathematica > #4857

Re: Column vectors should be interpreted as simple lists where

From Christopher Young <cy56@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Column vectors should be interpreted as simple lists where
Date 2011-09-11 11:29 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j4i63h$bug$1@smc.vnet.net> (permalink)
References <20110910115652.MZQ9L.1701997.imail@eastrmwml48>

Show all headers | View raw


On Sep 10, 2011, at 11:56 AM, Bob Hanlon wrote:

>
> MF[x_] := Map[Flatten, x]
>
> When using postfix notation you don't need to use a pure function form 
such as MF[#]&

Right, thanks. Actually, I think I needed a second argument, a level 
specifier in order to flatten column-vectors within a list of 
column-vectors. I use before but forgot in the version I mailed.

>
> 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]
>
> However, you don't need Flatten if you don't insert all of those 
extraneous brackets.
>
> Graphics[{
>  {Directive[Thick, Gray],
>   Line[Table[{x, Sin[x]}, {x, 0, 6.3, 0.1}]]},
>  {Directive[Dashed, Blue],
>   Line[{{2, 0}, {2, Sin[2]}, {0, Sin[2]}}]},
>  {Directive[PointSize[0.02], Blue], Point[{2, Sin[2]}]}},
> Axes -> True]
>
> Eliminating other extraneous material
>
> Graphics[{
>  {Thick, Gray,
>   Line[Table[{x, Sin[x]}, {x, 0, 6.3, 0.1}]]},
>  Dashed, Blue,
>  Line[{{2, 0}, {2, Sin[2]}, {0, Sin[2]}}],
>  PointSize[0.02],
>  Point[{2, Sin[2]}]},
> Axes -> True]
>
>
> Bob Hanlon

Chris Young
cy56@comcast.net

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Column vectors should be interpreted as simple lists where Christopher Young <cy56@comcast.net> - 2011-09-11 11:29 +0000

csiph-web