Linda 10 #. Q will convert a list of decimal digits to a number
http://www.jsoftware.com/jwiki/Vocabulary/numberdot#dyadic Q in your second example is a list kf numbers of varying digits. Is your goal to combine them like your first usage? If so, I dont think it will work since the numbers have a different number of digits Q=:?.(2 2)$ 16777216x Q 476146 5482079 12992854 14298660 1000 #. Q 481628079 13007152660 It seems like you want this, which I dont know is possible with random number of digits Q=: 1e4 2e4,. 3e4 4e4 Q 10000 30000 20000 40000 1e5 #. Q 1000030000 2000040000 On Sep 12, 2014 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
