Okay, so I managed to figure out what I was doing wrong. Here is the code I am using right now -->
M = size(img,1);
N = size(img,2);
axis ([73 M 941 N]);
Its still wrong because it is not recognising M and N variables -->
%
??? Error using ==> set
Bad value for axes property: 'XLim'
Values must be increasing and non-NaN.
Error in ==> axis>LocSetLimits at 210
set(ax,...
Error in ==> axis at 96
LocSetLimits(ax(j),cur_arg);
Error in ==> grid at 11
axis ([M 73 N 941]);
%