function [X,map] = rawread(filename,n,m);
% RAWREAD Read a Portable Bitmap file, or a raw file.
% RAWREAD('imagefile.raw', xsize, ysize) reads a "raw" image file
% RAWREAD('imagefile.pgm') reads a "pgm" (portable gray map) image
% [X,map] = RAWREAD('imagefile.raw') returns both the image and a
% color map, so that
% [X,map] = rawread('imagefile.raw',sx,sy);
% or [X,map] = rawread('imagefile.pgm');
% image(X)
% colormap(map)
% will display the result with the proper colors.
%
% NOTE : map is optional and could be replaced during the display by
% the "colormap('gray')" command
%
% See also IMWRITE, IMREAD, IMAGE, COLORMAP.