Maybe this?
5( 3 # ,:@,@":@:(#/"0)) i. 5
0 0 0 0 01 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
0 0 0 0 01 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
0 0 0 0 01 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
But I am confused as well about the request for a shape 3 5 5 of what appears
as a shape 3 45 literal matrix. I do have '01' in mine though. :-)
Cheers, bob
> On Jun 8, 2016, at 10:29 AM, Raul Miller <[email protected]> wrote:
>
> Did you mean something like this?
>
> (<.0.8*1+i.25) 10&#./."1] 3#,:5# i.5
> 0 0 0 0 1 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
> 0 0 0 0 1 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
> 0 0 0 0 1 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
>
> Except, that doesn't get you those leading zeros for the '01' column,
> so maybe instead it needs to be character?
>
> But a character array would not have anything to do with that 3 5 5
> shape you suggested, so for that, and guessing what you want, maybe it
> should be something like this?
>
> <.25%~i.3 5 5
> 0 0 0 0 0
> 0 0 0 0 0
> 0 0 0 0 0
> 0 0 0 0 0
> 0 0 0 0 0
>
> 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
>
> 2 2 2 2 2
> 2 2 2 2 2
> 2 2 2 2 2
> 2 2 2 2 2
> 2 2 2 2 2
>
> Except that that doesn't look at all like what you asked for. A 5 3 4
> shape gets a little closer:
>
> <.12%~i.5 3 4
> 0 0 0 0
> 0 0 0 0
> 0 0 0 0
>
> 1 1 1 1
> 1 1 1 1
> 1 1 1 1
>
> 2 2 2 2
> 2 2 2 2
> 2 2 2 2
>
> 3 3 3 3
> 3 3 3 3
> 3 3 3 3
>
> 4 4 4 4
> 4 4 4 4
> 4 4 4 4
>
> But all of these have conflicts with some aspect of your original
> request, and I can't figure out what it is that you really wanted.
>
> I hope this helps?
>
> Thanks,
>
> --
> Raul
>
>
> On Wed, Jun 8, 2016 at 5:22 AM, 'Bo Jacoby' via Programming
> <[email protected]> wrote:
>> Dear J'ers.
>> Please tell me how to program the 3 5 5 array below.
>> I am experimenting rather than understanding. I expect the answer to be
>> quite elementary.
>> Thanks! Bo.
>>
>> 0 0 0 0 01 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
>> 0 0 0 0 01 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
>> 0 0 0 0 01 1 1 1 12 2 2 2 23 3 3 3 34 4 4 4 4
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm