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!