|
On Oct 5, 6:33 pm, "ade77" <ade1...@gmail.com> wrote:
> Hi,
>
> I am trying to develop a simple GUI in MATLAB. I want to subtract a number from an array continously, until the user stops the program.
>
> On my GUI, I have
> 1. A listbox to display the vector
> 2. A button called GO!
> 3. A text box where the user can type in numbers
>
> Problem:
> 4. I have a vector in the workspace say x, I want to display this vector in the listbox.
> 5. The user should be able to put in different values into the text box, and whenever he clicks go, the list box will display the adjusted value.
>
> Example y = [2 4 6 8];
> this will be displayed in the listbox,
> when the user types in 5 in the textbox, the clicks GO!, the listbox will display -3, -1, 1, 3.
>
> Thanks
-----------------------------------------------------------
Why use a listbox when you're just displaying a single item?
Anyway, you use the set() command, like set(handleToListbox, 'string',
string or cellarray variable) - something like that. I'd probably
just use a static text for display.
|