MathGroup Archive 2011

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

Search the Archive

Re: concatenate matrices?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118154] Re: concatenate matrices?
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Thu, 14 Apr 2011 07:08:11 -0400 (EDT)
  • References: <io6d37$dr4$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 4/14/2011 2:00 AM, Robert Rosenbaum wrote:
> DrMajorBob,
>
> A little off topic, but I was wondering why you suggested the prefix notation
>> Transpose@{y1, y2}
> instead of
> Transpose[{y1,y2}]
>
> I've noticed other people doing the same on this mailing list, and sometimes
>  suggesting postfix as well.  I would guess that Transpose[{y1,y2}] is more
>  readily understood by most users.  Is there a reason that you and others
>  often suggest the arguably less common prefix or postfix notations?
>

For me, sometimes I use @ for 3 main reasons:

1) If the expression has too many [[[[ ... ]]]], then using @ helps
eliminates a pair of [], making the expression easier to read.

2) typing foo@x has one less key stroke than foo[x]. So, when
my fingers are tired, I tend to use @ more ;)

3) For existing expression, if you wanted to insert a call
to a function 'foo' in the middle of it, then by writing

                .....foo at ....

you do not have to worry about having to go look for where to
insert the second ']' at the other end, which will be in a place in
the middle of the expression as well.

            ...... foo[......]......

The editor can help with its highlighting the matching [], since you
first still need find the correct location to insert the right ]. In
a complicated expression, then can take bit more time.

Easier to just type foo@

As for the more easily understood part, this is all a matter of time.
With time, you'll find @ just as easy to look at as [...]


--Nasser


  • Prev by Date: Re: Undesired horizontal line in Plot / Bug?
  • Next by Date: Re: Undesired horizontal line in Plot / Bug?
  • Previous by thread: Re: concatenate matrices?
  • Next by thread: Re: concatenate matrices?