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

Reply via email to