Load data file and compare data

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 comentario

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

Iniciar sesión para comentar.

Respuestas (1)

Joseph Moraal
Joseph Moraal el 1 de Ag. de 2016
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.

Categorías

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

Etiquetas

Preguntada:

el 25 de Jul. de 2016

Respondida:

el 1 de Ag. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by