newbie myHead question
- To: mathgroup at smc.vnet.net
- Subject: [mg47017] newbie myHead question
- From: János <janos.lobb at yale.edu>
- Date: Sat, 20 Mar 2004 03:50:29 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I have m = {{a, b}, {a, b}, {a, b}} When I apply Transpose to it, I will have Transpose[m] {{a, a, a}, {b, b, b}} The FullForm of it is List[List[a, a, a], List[b, b, b]] Now, if I do n = Apply[myHead, m] I get myHead[{a, b}, {a, b}, {a, b}] If I apply Transpose to it, I get Transpose[n] Transpose[myHead[{a, b}, {a, b}, {a, b}]] The FullForm of it Transpose[myHead[List[a, b], List[a, b], List[a, b]]] which is not that I need. I need myHead[{a,a,a},{b,b,b}] or myHead[List[a, a, a], List[b, b, b]] What am I missing ? What should I do to get myHead[{a,a,a},{b,b,b}] ? Thanks ahead, János ------------------------------------------------- clear perl code is better than unclear awk code; but NOTHING comes close to unclear perl code http://www.faqs.org/faqs/computer-lang/awk/faq/
- Follow-Ups:
- Re: newbie myHead question
- From: Oleksandr Pavlyk <pavlyk@phys.psu.edu>
- Re: newbie myHead question
- From: Bob Walker <walkerbg@ieee.org>
- Re: newbie myHead question