function [A] = imload(imname,nrows,nclmns)

% The function loads an image in matlab.
% Usage: 	A = IMLOAD ('IMNAME', NROWS, NCLMNS)
%	where	A: 	image in a matrix
%		IMNAME:	name of the image file to be loaded in matlab syntax
%		NROWS:	number of rows in the image
%		NCLMNS:	number of columns  in the image

fid = fopen(imname,'r');
size = [nrows, nclmns];
A = fread(fid, size);
fclose(fid);
