This code will produce four different samples of plaid material.  How would
you make them   more efficiently without changing   the intent of P ?

 

load 'viewmat'

RGB216=: (6 6 6#:i.216){(i.6)*255%5

GRB216=:1 0 2{"1 RGB216

P=: +/~Q=:(T=:12$30 20 70 40)#S=:N,N,N=:4?216

GRB216 viewmat P;'gray GRB216'

P=: +/~Q=:(T=:12$30 20 70 40)#S=:N,N,N=:4?216

GRB216 viewmat P;'gray GRB216'

P=: +/~Q=:(T=:12$30 20 70 40)#S=:N,N,N=:4?216

GRB216 viewmat P;'gray GRB216'

P=: +/~Q=:(T=:12$30 20 70 40)#S=:N,N,N=:4?216

GRB216 viewmat P;'gray GRB216'

 

Linda

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to