You don't need the inner plot loop, and some other stuff can be simplified. I just removed the figure and imshow previews for brevity.
numgrains = max(label(:));
[row,col]=find(label==j);
breadth=max(col)-min(col)+2;
xrange = min(col)-1+(0:breadth);
yrange = min(row)-1+(0:len);
target = a(yrange,xrange) .* uint8(c(yrange,xrange));
mytitle=strcat('Rice number: ',num2str(j));
ax=subplot(1,numgrains,j);
Alternatively, you can get the location using regionprops():
S=regionprops(c,'boundingbox');
tp = round(S(j).BoundingBox);
xrange = tp(1)+(-1:tp(3)+1);
yrange = tp(2)+(-1:tp(4)+1);
target = a(yrange,xrange) .* uint8(c(yrange,xrange));
mytitle=strcat('Rice number: ',num2str(j));
ax=subplot(1,numgrains,j);
You might need to tweak the subscript vectors by a pixel to get your padding exactly as you want it.
In both examples, I made a note on the same line. In your original code, the pointwise method only extracts the portion of the image selected by the mask c. If on the other hand, you wanted to select the region of the image defined by the bounding box you calculate around the image, then change that line to
target = a(yrange,xrange);
The first method truncates the edges of the grains according to the mask and makes them jagged. The second method shows the grains with their local background and natural edges. Which to use depends what your intent is for using the images of the objects.