I am trying to make a GUI in which I want to give a toggle button (name 'Load'), which will load the data. Then a function having baseline measurement will be called to compare the result (result which is obtained from load is compared to baseline result). How can I do this?

댓글 수: 1

Geoff Hayes
Geoff Hayes 2016년 8월 1일
Sai - please clarify what you need help with. Have you created the GUI (using GUIDE or App Designer)? Or comparing the data?

댓글을 달려면 로그인하십시오.

답변 (1개)

Joseph Moraal
Joseph Moraal 2016년 8월 1일

0 개 추천

Assuming that your question is pertaining to how to create the button click behavior you can do the following.
You can specify a callback to execute when clicking a button by using the "Callback" name-value pair argument in the "uicontrol" command. For example, the following code creates a button which opens a message box that says "Boo!" when you click on it:
>> fh = figure;
>> btn = uicontrol('Style', 'pushbutton', 'String', 'Click me!', 'Callback', @(~, ~) msgbox('Boo!'));
Refer to the following documentation page for more information on the "uicontrol" command:
In your callback you could use one of MATLAB's commands such as "dlmread", "csvread", etc to load your data. At that point you should be able to perform any data processing necessary for your app.

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

질문:

2016년 7월 25일

답변:

2016년 8월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by