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:
GUIDE listbox

Subject: GUIDE listbox

From: Ormo

Date: 30 Dec, 2012 19:09:08

Message: 1 of 2

How can i make a listbox in GUIDE collect and list the first line of each column of a matrix while each column's first line is a string,name etc and when i select an object from the list, display the corresponding column's data in my plot box?

Subject: GUIDE listbox

From: Image Analyst

Date: 31 Dec, 2012 04:59:08

Message: 2 of 2

"Ormo " <ironhoofox@yahoo.gr> wrote in message <kbq3gk$due$1@newscl01ah.mathworks.com>...
> How can i make a listbox in GUIDE collect and list the first line of each column of a matrix while each column's first line is a string,name etc and when i select an object from the list, display the corresponding column's data in my plot box?
---------------------------------------------------------------------------------------------------------
Get the text or numbers into a string. I'm not really clear what you're talking about but you can use sprintf() to convert multiple strings and numbers into a single string. Then send that to the listbox which you've placed on your figure in GUIDE, with the set() command

yourString = sprintf('%s %s %d %.2f', whatever...........
set(handles.listbox, 'String', yourString);

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