Exactly, thanks.  I see that the shape of mat and the like sized matrix of
'J' is

 $ mat1,:'J'
2 6 10

so that the 0 or 1 selects from the first dimension...and the verb } vs the
verb { makes it work.  Thanks! That is what I couldn't figure out how to
do, thanks again.  Having admitted my ignorance in public, I might remember
it.

On Sun, Nov 13, 2011 at 3:27 AM, Ric Sherlock <[email protected]> wrote:

> On Thu, Nov 10, 2011 at 5:54 PM, Nick Simicich <[email protected]> wrote:
> >
> > I have a second question.  I wanted to make two x by x matrices, and
> > compare one of those matrices to a scalar, building a single matrix by
> > extracting from each one.  What I wanted to do was to code some variation
> > of.  I had a matrix where the filled in pieces were ordinary numbers and
> > the placeholders were _.  I had a second matrix that had candidates, but
> > they were not
> >
> > (a=b) { mat1,.mat2
> >
>
> Is this the sort of thing you were looking for?
>
>   ]mat1=: (6 10?.@$10) { 'abcdefghij'
> egigfigggj
> dcdbjchajf
> hhjheihecb
> baedjdchee
> adhfjgdcic
> adfeaadbfa
>   ('j'=mat1)}mat1,:'J'
> egigfigggJ
> dcdbJchaJf
> hhJheihecb
> baedJdchee
> adhfJgdcic
> adfeaadbfa
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Of course I can ride in the carpool lane, officer.  Jesus is my constant
companion.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to