Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Gui - save output variables in loop?

Subject: Gui - save output variables in loop?

From: James Ramm

Date: 6 Jun, 2010 19:50:20

Message: 1 of 1

Hi, I have a GUI problem, hope you can help...

My GUI loads some data, you then select a variable and press a button called 'variogram'
This takes you to an interactive window where parameters are entered into edit boxes and used to calculate variograms. The GUI then saves the result of the variogram calculation, i.e.:

guidata(handle, struc.variogram_parameters)

My problem is that typically a datafile has more than 1 variable which needs a variogram, therefore I need to press the variogram button again and again (i.e run the callback over and over), each time saving the output to a new variable, not overwriting the last one, such that:
guidata(handle, struc.variogram_parameters(i) )

How should I do this? I thought about putting the whole callback function in a loop, but of course, it needs to wait to move on to the next variogram until the user has selected the next data and pressed the variogram button again...

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us