MATLAB Answers


How to find individual subplots from a single figure?

Asked by Roni
on 24 Jun 2013

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');



No products are associated with this question.

1 Answer

Answer by the cyclist
on 24 Jun 2013
 Accepted answer

Assign handles to each individual figure. For example,

h121 = imagesc(Mxy3);


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today