Listboxes GUI Multiple Selection

Suppose I have two vectors with the same number of elements:
A = 1 2 3 4 5 6 7 8 9 10
B = 20 40 50 60 80 100 120 140 160 200
Suppose I want to display these in separate list boxes in a GUI - is it possible to do a table instead?
But the idea is the prompt the user to select, say, list box A for values 3 , 5 , 7, 9 and its corresponding value in B and plot them against each other.
Is this possible?

2 comentarios

Jan
Jan el 16 de Oct. de 2013
Yes, this is possible. What did you try so far? Which problem occurred?
T
T el 17 de Oct. de 2013
I looked at the following page:
but the example they provide with lb.m doesn't display the polynomials.

Iniciar sesión para comentar.

 Respuesta aceptada

Image Analyst
Image Analyst el 16 de Oct. de 2013

0 votos

Try using GUIDE: http://blogs.mathworks.com/videos/category/gui-or-guide/ This is certainly possible. You might like to try a framework where you can easily modify it: MAGIC - it has most of the basic controls on there and you just replace the callbacks (which usually pop up a message or write to a label saying something like "you clicked on a button" or whatever), with your own code.

7 comentarios

T
T el 17 de Oct. de 2013
I don't have the signal processing tool box.
Image Analyst
Image Analyst el 17 de Oct. de 2013
Signal processing toolbox is not required for anything in my response.
T
T el 17 de Oct. de 2013
Editada: T el 17 de Oct. de 2013
I am acquainted with GUIDE. As far as I have searched, you cannot load two columns in a list box. So right now I have two list boxes, however, I cannot select multiple entries within them. I was looking at the table feature but I was unable to import the data from the workspace. Essentially I have two columns of data, I only want to plot certain rows. What would you advise?
Image Analyst
Image Analyst el 17 de Oct. de 2013
You have to set the "max" property of the listbox equal to 2 to turn them from single selection into multiple selection.
T
T el 17 de Oct. de 2013
Okay I got it. But would a table be more suitable in this case? Because then I can just extract the rows selected as opposed to clicking each entry in each listbox.
Image Analyst
Image Analyst el 18 de Oct. de 2013
I never use tables for selecting data - just for displaying a table of numbers. If you want the user to select some I think you're better off with listboxes.
T
T el 18 de Oct. de 2013
Thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

T
T
el 16 de Oct. de 2013

Comentada:

T
T
el 18 de Oct. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by