Saving/Associating slider values with a pop-up menu

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-03-25T17:40:46Z Indexed on 2010/03/25 17:43 UTC
Read the original article Hit count: 444

Filed under:
|
|
|

Hi,

Following on from a question I posted yesterday about GUIs, I have another problem I've been working with. This question related to calculating the bending moment on a beam under different loading conditions.

On the GUI I have developed so far, I have a number of sliders (which now work properly) and a pop-up menu which defines the load case. I would like to be able to select the load case from the pop-up menu and position the loads as appropriate, in order to define each load case in turn. The output that I need is an array defining the load case number (the rows) and a number of loading parameters (the itensity and position of the loads, which are controlled by the sliders).

The problem I am having is that I can produce this array (of the size I need) and define the loading for one load case (by selecting the pop-up menu) using the sliders, but when I change the popup menu again, the array only keeps the loading for the load case selected by the pop-up menu.

Can anyone suggest an approach I can take with (specifically to store the variables from each load case) or an example that illustrates a similar solution to the problem?

The probem may be a bit vague, so please let me know if anything needs clearing up.

Many Thanks, James

© Stack Overflow or respective owner

Related posts about matlab

Related posts about gui