setting the position of an image in a figure?

19 views (last 30 days)
alex on 15 Oct 2012
I have this small loop, that shows a 'text' UIcontrol . after a small pause it I change the text's visiblty, and want to load an image instead..
I use
while ii<num_of_rounds
axes('Position',[.35 .3 .3 .3]);
I have two problems here-
1. matlab tells me that the
axes('Position',[.35 .3 .3 .3]);
takes too long and I should take it out from the loop- how can I do it, while still haveing the image in that position and without opening a new figure ( in an exsisting GUI)?
alex on 15 Oct 2012
just change the directories and put some jpg photos and it will work (there are still other problems) you will find the loop in line 102.. its not a while loop but it does'nt matter

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 15 Oct 2012
Don't worry about it. The time is inconsequential. One thing to note is that your repeated calls to image stack up a bunch of images in the axes control so this loop will slow down as it goes. Put in a "cla" before "image" to clear out prior images. You might actually need the Position resizing code in there if it automatically resizes the control for each new image (which it will do unless you've set "hold on"), and you don't want that.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!