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

1 次查看(过去 30 天)
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 个评论
Adam Danz
Adam Danz 2019-8-20
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?

请先登录,再进行评论。

采纳的回答

Adam Danz
Adam Danz 2019-8-20
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 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by