how to send a variable from input field in app designer to a function that is working as a subfunction?
31 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Muazma Ali
el 13 de Nov. de 2025 a las 13:13
Comentada: dpb
el 13 de Nov. de 2025 a las 17:20
Hi! :)
I have a problem:
In my small software program that I am making, I want the user to input the pressure in appdesigner and the pressure has to be input from user as it varies between 10 bar to 600 and I cant use for example a dropdownlist in a function. But my problem is that I am using the variable pressure in a subfunction some places so I dont understand how I can send it from an input field in app designer to those subfunctions..?
Any good ideas.?
8 comentarios
dpb
el 13 de Nov. de 2025 a las 17:20
The set (one or more) of values you need to pass to call a function
function res=myfunction(a, b, c)
res=somefunction(a,b,c);
end
Here, a, b, c are the arguments; collectively, they are the argument list.
If in your app your function(s) were to need multiple arguments besides just the one pressure you mentioned, the argument list can get long and if there's a need to change the agruments in some function later on, you have to correct both the function and the caller to match. On the other hand, with an AppBuilder app, if you were to pass the app object, then you can make all the adjustments inside it and reference anything needed directly; the argument list to the function and calling it don't need to change.
Respuestas (0)
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!