Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1668 > unrolled thread
| Started by | Robert Rosenbaum <robertr@math.uh.edu> |
|---|---|
| First post | 2011-04-14 09:00 +0000 |
| Last post | 2011-04-15 07:54 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: concatenate matrices? Robert Rosenbaum <robertr@math.uh.edu> - 2011-04-14 09:00 +0000
Re: concatenate matrices? "Nasser M. Abbasi" <nma@12000.org> - 2011-04-14 11:08 +0000
Re: concatenate matrices? Helen Read <readhpr@gmail.com> - 2011-04-15 07:54 +0000
| From | Robert Rosenbaum <robertr@math.uh.edu> |
|---|---|
| Date | 2011-04-14 09:00 +0000 |
| Subject | Re: concatenate matrices? |
| Message-ID | <io6d37$dr4$1@smc.vnet.net> |
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?
Best,
Robert
On Apr 12, 2011, at 4:56 AM, DrMajorBob wrote:
> Transpose@{y1, y2}
>
> Bobby
>
> On Mon, 11 Apr 2011 06:08:14 -0500, hadi motamedi <motamedi24@gmail.com>
> wrote:
>
>> Dear All
>> I have two column matrices named y1 & y2 with dimensions as 448000*1 .
>> Can you please let me know how to construct a new matrix say 'y' with
>> dimensions 448000*2 such that each column of it equals y1(or y2)?
>> Thank you
>>
>
>
> --
> DrMajorBob@yahoo.com
>
[toc] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2011-04-14 11:08 +0000 |
| Message-ID | <io6kin$ff0$1@smc.vnet.net> |
| In reply to | #1668 |
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@....
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
[toc] | [prev] | [next] | [standalone]
| From | Helen Read <readhpr@gmail.com> |
|---|---|
| Date | 2011-04-15 07:54 +0000 |
| Message-ID | <io8tka$q8c$1@smc.vnet.net> |
| In reply to | #1675 |
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@....
>
> 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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web