set execution points in your code
2 views (last 30 days)
ihave a code which gives multiple output images,i access them from gui and view it on axes,i want to show those images one at a time by setting point in my code where only on pressing a button from gui should execute and display output image for that set of code. (what i mean is code is to be divided into segments.when ipress a button on gui ist segment should execute,when i press again 2nd segment should execute and on and on)
Joseph Cheng on 21 Apr 2014
Simple way to do this would be that separating the sections of code into switch/case statement where you would stick each segment of code into each case and increment a value at the end of the button press.
%section of code for first button press
%store values for second button press
%section of code for second button press
%store values for third button press
%section of code for third button press
%store values for next button press
Troubles that can occur is that you need to make sure you are storing the appropriate variables in their correct state for the next processing. Also you can use mod() to get the button presses to loop after the user hits the button multiple times.