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:
HELP WITH GUIDE

Subject: HELP WITH GUIDE

From: ade77

Date: 5 Oct, 2009 22:33:04

Message: 1 of 2

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

Subject: HELP WITH GUIDE

From: ImageAnalyst

Date: 5 Oct, 2009 22:40:12

Message: 2 of 2

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.

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