change only 3 of many outputs of a function through the App Designer
1 次查看(过去 30 天)
显示 更早的评论
I have an Configuration.m file with many variables. I use it as a configuration settings file.
It contains many variables, which I change every time in order to get different plots. After I change them I run the file through another function which uses the variables of the Configuration.m file.
I am trying to create an App via App Designer for the program I have made.
On the app designer I would like to control and change the variables of the Configuration.m file, that's why I converted the Configuration.m file to a function file.
From all the outputs of the Configuration function(now) I would like to change specific outputs.
How am I supposed to access and modify through the app designer only the outputs that interest me ?
2 个评论
Mario Malic
2020-11-5
What does it mean many variables? what type of variables are there? How does your program read them? Are you running the script and getting the variables from workspace?
Write a short example of your code please, and we can suggest something.
采纳的回答
Mario Malic
2020-11-6
编辑:Mario Malic
2020-11-7
I am not sure what would be the easiest way considering that Configuration.m generates a file. After you call Configuration, you can read file, edit and save it again, or you can do it after you call LoadFile.
You can create a helper function or write code directly after LoadFIle that will set variables values according to the value in component Edit Field Numeric.
Data.fmin = app.EditFieldComponent1.Value;
Data.fmax = app.EditFieldComponent2.Value;
Edit:
This would work if your function NeuronsAnalysis() would receive app as input argument and if you'd call the function within the app.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!