The number of ,/ 's seems to be handled by this
phrase.
(-. 1{.0#]),/^:((0>[EMAIL PROTECTED])`])expndZrs1
On Tue, 4 Mar 2008, Brian Schott wrote:
Building on Boss's and Miller's answer, I get the
following. Two ,/,/ 's work for M , but not for M, 1 0 0 0
for example; in that case three ,/,/,/ 's are required. TBA
expndZrs =: _1 1 (] i.&0)}"0 1 ]
expndZrs1 =: ]`expndZrs`($:@expndZrs)@.(2<.+/@( e.&0))"1
(-. 1{.0#]),/,/expndZrs1 M
1 _1 _1 1
1 _1 1 1
1 1 _1 1
_1 1 _1 _1
_1 1 1 _1
1 1 _1 _1
1 1 1 _1
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm