Help for this page

Select Code to Download


  1. or download this
    pdl> p $x
    [
    ...
     [0 1 2]
     [6 7 8]
    ]
    
  2. or download this
    pdl> p uniq $x
    [0 1 2 3 4 5 6 7 8]
    
  3. or download this
    pdl> p scalar hist $x,0,256,1
    [3 3 3 1 1 1 2 2 2 0 0 0 0 0 ....]
    
  4. or download this
    [0 1 2] 3
    [3 4 5] 1
    [6 7 8] 2
    
  5. or download this
    my %lookup = (
      0 => "0 1 2",
    ...
    
    # Then $x reduces down to
    $x = [ 0 1 2 0 0 2 ];