octave> gh=histogram(g,256); # Ganymede's histogram. octave> plot(0:255,gh);
octave> gc=cdf(g); # Ganymede's cdf. octave> plot(0:255,gc);
octave> c=readpgm('callisto.pgm'); magic number = P2 rows = 128 cols = 128 grey levels = 255 octave> gdisplay(c);
octave> ch=histogram(c,256); # Callisto's histogram. octave> plot(0:255,ch);
octave> ci=icdf(c); # Callisto's icdf. octave> plot(0:255,ci);
octave> m=match(g,c); # Make a Ganymede with a histogram like Callisto's. octave> gdisplay(m);
octave> mh=histogram(m,256); octave> mplot(0:255,mh,0:255,gh); # Callisto's histogram (green). Matched histogram (red).