MathGroup Archive 2011

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

Search the Archive

Re: concatenate matrices?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118162] Re: concatenate matrices?
  • From: Helen Read <readhpr at gmail.com>
  • Date: Fri, 15 Apr 2011 03:54:44 -0400 (EDT)
  • References: <io6d37$dr4$1@smc.vnet.net> <io6kin$ff0$1@smc.vnet.net>

On 4/14/2011 7:08 AM, Nasser M. Abbasi wrote:
> 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.

Personally I prefer the nested [ ] so I can see where everything begins 
and ends. I find the @ notation harder to read. Obviously YMMV.

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

With @ you need to hit the Shift key, so it's not really a net gain.


> 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.

I'm a big fan of Alt-]  to insert matching [ ] as you go.

-- 
Helen Read
University of Vermont


  • Prev by Date: Re: broadcasting of Equal ? (newbie question)
  • Next by Date: Re: concatenate matrices?
  • Previous by thread: Re: concatenate matrices?
  • Next by thread: Re: concatenate matrices?