MATLAB: How to find individual subplots from a single figure

figuregetineimage analysisimprofilesubplot

Hi All,
I want to write a function/code which identifies individual subplots from a single image. I have provided the code here.. h4 is a single image and the two subplots are the ones i want to identify individually. The reason behind that is….Since, i am unable to use improfile function on both subplots at the same time, i want to use getline function to identify the [x,y,z]. and then use those positions to draw intensity profile on individual subplots to compare them.
{
h4 = figure('Position', [100 100 600 300]) ; figure(h4);
subplot(121), imagesc(Mxy3), colorbar; set(gca, 'Clim', [0, 1]);title('Mxy After shimming');
subplot(122), imagesc(Mxy), colorbar;set(gca, 'Clim', [0, 1]);title('Mxy Before shimming');
}

Best Answer

Assign handles to each individual figure. For example,
h121 = imagesc(Mxy3);