Here's what I notice:

In your first example, the largest possible value in Q was 9, and you
referred to GRB256 even though you had not yet defined it.

In your second example, the largest possible value in Q was greater than 999.

Inspecting samples of the data (try 3 3 {.Q and 3 3 {. S) should make
the significance of the "largest possible value" issue apparent.

Thanks,

-- 
Raul


On Fri, Sep 12, 2014 at 4:09 PM, Linda Alvord <[email protected]> wrote:
> This is the real problem I'm working on.  Here's what works.
>
>
>
> load 'viewmat'
>
> GRB=:1 0 2{"1 ( #:i.8){0 255
>
> p=: 13 :'?.(y,y)$y'
>
> ]Q=:p 10
>
> ]R=:10 #. Q
>
> ]S=:(10$10)#:R
>
> Q-:S
>
>
>
> GRB256 viewmat Q;'Q'
>
> GRB256 viewmat S;'S'
>
>
>
> Q is a random array of data which has a corresponding color image.The data
> is coded in base 10. That list is then transformed into an array S .  Q
> matches S and image S is like image Q.
>
>
>
> Here's where it doesn't work.
>
>
>
> load 'viewmat'
>
> GRB256=:1 0 2({"1) 256 256 256#:i.256^3
>
> Q=:?(1000 1000)$ 16777216x
>
>
>
> R=:1000 #. Q
>
> S=:(1000$1000) #: R
>
> Q-:S
>
>
>
> GRB256 viewmat Q;'Q'
>
> GRB256 viewmat S;'S'
>
>
>
> Q and R seem to be what I expected, but something is wrong with S.  Any
> ideas?
>
>
>
> Linda
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to