How do I take input through the editbox in GUI and then pass the data in a script(.m) file?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Animesh Anand
am 16 Mai 2022
Kommentiert: Animesh Anand
am 19 Mai 2022
I am developing a GUI where I will be taking inputs from the user and then use the input data in the code I have written earlier such that upon clicking the pushbutton my code should run and give output.
2 Kommentare
Geoff Hayes
am 16 Mai 2022
@Animesh Anand - are you using App Designer for your GUI? Does your function (from the code that you have written earlier) accept input parameters in the function signature? Please provide some details.
Akzeptierte Antwort
Geoff Hayes
am 16 Mai 2022
@Animesh Anand - you will need to convert your code from a script (if that is what it is) to a function so that you define the correct input parameters that will be passed from your GUI to the function. For example, you will need to define the signature as
function estimateSupportForce(jointPlaneDip, slopFaceDip, slopeHeight, tensionCrackDepth, supportForceAngle, meanPhi)
and then call this function from the GUI and pass the parameters in the correct order. You can change these parameter names to match that in your code (i.e. jointPlaneDip is joint_plane_dip, etc.)
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!