Display optimization variable/solution
2 次查看(过去 30 天)
显示 更早的评论
I am solving a finction minimizing the objective function. The optimization variable looks like this [3D array]
a=3; b=2; c=50;
costs_tasks = rand (3,2);
linoptim = optimproblem;
x = optimvar('x',a,b,c,'Type', 'integer','LowerBound',0,'UpperBound',1);
objfun = sum(sum(sum(x,3).*(costs_tasks),2),1);
linoptim.Objective = objfun;
sol = solve(linoptim)
There are also some constraints I consider.
By solving the objective function, there are certain pages (3rd dimension) with the value 1 and I would like to see them.
My question ist, how can I display the optimal variable?
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!