Is it possible for a 3D varaible to be used in a optimization problem

2 ビュー (過去 30 日間)
BOWEN LI
BOWEN LI 2019 年 7 月 22 日
回答済み: Yogesh Khurana 2019 年 8 月 2 日
Hi everyone, I have a very straightforward question that is it possible to operate on a 3D optimization varibale by using optimization toolbox?
for example, the variable is in the format as: y=optimvar('y',[4,1,4],'Type','integer','LowerBound',0,'UpperBound',1);

回答 (1 件)

Yogesh Khurana
Yogesh Khurana 2019 年 8 月 2 日
Yes, you can pass variable dimension variable in optimvar. Example:
% Create a 2-by-3-by-4-by-2 array of optimization variables:
x = optimvar('x', 2, 3, 4, 2); % or x = optimvar('x', [2 3 4 2]);
You can also refer to the following documentation on optimvar for more information:

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by