![ML.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/231706/ML.png)
MILP Optimization dynamic input
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I'm planning to implement a tool to optimize a project portfolio. My problem is that the optimization is dependent from a users input, as these inflence the contrains. For example, an user can enter a required amout of resources in order to complete a project. It is than tested whether there are enough resources to complete this project and this input is than used for the optimization. I was thinking to use the App Designer in order to create a GUI with tables to enter all required inputs. However, I thinks it's hard to get the data enterd into a table. Has anyone an idea on how to implement this tool?
Cheers
0 commentaires
Réponses (1)
Dheeraj Singh
le 29 Juil 2019
I understand that you want to enter user input through a table.
You can do that by making the table fields editable.
So, depending upon the input, suppose you want the user input in the form of mXn matrix
You can initially fill the table with NaN(not a number) values along with a button in the following manner:
function startupFcn(app)
%no of rows 10
%no of columns 4
a1=nan(10,4);
a2=num2cell(a1);
app.UITable2.Data = a2;
end
It will look something like this:
![ML.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/231706/ML.png)
After that you can use call back for the button the to take all your input using table.
0 commentaires
Voir également
Catégories
En savoir plus sur Portfolio Optimization and Asset Allocation 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!