How to create a GUI in matlab where the user can select a single testcase he wants to run?
Show older comments
Hello,
I'm trying to create a GUI for Model In loop Regression testing using the Matlab script. Here I have 100 testcases,
I want to select single testcase out of 100 and that selected testcase should run. I want the format to look like below
- Testcase 1
(i)TestCase1a
(ii)TestCase2a
2. TestCase 2
(i)TestCase1b
(ii)TestCse2b
etc
Currently, I'm using prompt command to enter the Testcase number I want to run. But I want to improvise this in GUI format which has all the testcases for the user selection.
Any inputs greatly appreciated!
Thank you!
4 Comments
Voss
on 15 Mar 2024
Looks like a uitree might be an appropriate choice of UI component:
You're welcome!
Here is a code structure you can use (you should take care that only one node is selected at a time, too):
function TreeSelectionChanged(app, event)
switch app.Tree.SelectedNodes
case app.Sensor1FaultNode % <- the name of Sensor1 Fault Node in your app
TC_RunNum = 10;
case app.Sensor2FaultNode % <- the name of Sensor2 Fault Node in your app
TC_RunNum = 11;
% etc.
end
% then run your script here
end
jenny
on 16 Mar 2024
Accepted Answer
More Answers (0)
Categories
Find more on Update figure-Based Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!