Building an app that does calculations based on user input

6 vues (au cours des 30 derniers jours)
Caleb Sanders
Caleb Sanders le 13 Août 2019
Réponse apportée : TED MOSBY le 22 Août 2025 à 12:28
Hello, I've written a MATLAB script that takes a bunch of user input data (things like diameter, efficiency, gain, etc), does calculations based on this data (using functions created in their own files), then displays the calculated numbers. My script functions fine, but I'm using this project as an opportunity to learn about MATLAB's App Designer. I would like to make an app with the functionality I just described that also has an easy UI.
So far, I have created the properties 'diameter' and 'efficiency'. I've created two numeric edit fields (in the design view) that allow the user to input these data values. I've also created a "Submit Data" button (with it's corresponding callback function) that allows the user to submit the entered data. In addition to all the houskeeping code that MATLAB automatically inserts for you, my additional code is listed below. Am I on the right track here? If so, what next steps do I need to take in order to start manipulating the input data for calculations? How (and where) can I integrate functions that I have already written into this code? Thanks in advance!
properties (Access = private)
diam; % Description
eff;
end
methods (Access = private)
% Button pushed function: SubmitDataButton
function SubmitDataButtonPushed(app, event)
app.diam = app.DiameterEditField.Value;
app.eff = app.EfficiencyEditField.Value;
end
end

Réponses (1)

TED MOSBY
TED MOSBY le 22 Août 2025 à 12:28

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by