Easiest way to change variables based on decisions made by user?

1 visualización (últimos 30 días)
I am using kNN classification on data extracted via tracking of video.
I have different predictors that need to be loaded based on what set of videos the user wants to process (low height or high height)
What is the easiest way to present a choice in the gui when the program is first ran, one that poses the question:
What videos are you processing?
(tickbox for high height)
(tickbox for low height)
Then based on which the user selects, loads either predictor file a or predictor file b?
Cheers
  1 comentario
Adam Danz
Adam Danz el 20 de Ag. de 2019
It sounds like you've already developed a GUI and would like to add to it. If that's the case, are you using app designer, GUIDE, or a custom uicontrol GUI?

Iniciar sesión para comentar.

Respuesta aceptada

Adam Danz
Adam Danz el 20 de Ag. de 2019
If you're not already working from a GUI and the only interface is this one question, here's a quick and easy solution.
response = questdlg('What videos are you processing?', mfilename, 'High height', 'Low height', 'High height');
if strcmpi(response,'High height')
% do something
else
% do the other thing
end
If you're working from app designer, you should use uiconfirm() instead or just build the question into your existing app.
  4 comentarios
James Morris
James Morris el 20 de Ag. de 2019
Ah I see! You're the man, thank you
Adam Danz
Adam Danz el 20 de Ag. de 2019
Sounds like an interesting project! Good luck!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by