I do not believe that there is an easy way to do this. There are two options:
First use the position of the subtitle position:
>> subplot(2,5, i, [l, b, w, h])
and calculate the left, bottom, width, height.
Or, take the handle of the returned axis:
>> h(i) = subplot(2,5,i);
and then change the axis after.
>> set(h(1), 'position', [l, b, w, h] );
There are several pages that will contain more detailed information, for example http://www.briandalessandro.com/blog/how-to-make-a-borderless-subplot-of-images-in-matlab/
[update]
The code below contains a bit more information about who you can do something like what you are looking for. This is a little tiring. 0.95 and 0.02 are just a small addition. They are not magical. :-)
Another thing to note is that I recommend that you use βiiβ as the index variable (or something else), since βiβ is defined as sqrt (-1). A good convention is not to use "i" and "j" as index variables (especially in Matlab).
img = rand(400,600); figure(1); clf(); hold on; % Get the width and height of the figure lbwh = get(1, 'position'); figw = lbwh(3); figh = lbwh(4); % Number of rows and columns of axes ncols = 5; nrows = 2; % w and h of each axis in normalized units axisw = (1 / ncols) * 0.95 axish = (1 / nrows) * 0.95 for ii=1:10 % calculate the row and column of the subplot row = floor( ii/(ncols+1) ) + 1 col = mod( ii-1, ncols ) + 1 % calculate the left, bottom coordinate of this subplot axisl = (axisw+0.02) * (col-1) axisb = (axish+0.02) * (row-1) % plot the subplot h= subplot('position', [axisl, axisb, axisw, axish] ); imshow(img); title(['Image ' int2str(ii)]); pause end
You will need to play with him to do exactly what you want. And "help" is your friend.