フィルターのクリア

Optimization variable which takes input in the form of matrix or vectors

2 ビュー (過去 30 日間)
Mondeep maz
Mondeep maz 2018 年 8 月 8 日
回答済み: J. Alex Lee 2018 年 8 月 8 日
I need to multiply a 100×48 matrix with a 48×1 vector and the sum of the elements of the resultant vector is the objective function. Is it possible that i can model the optimization variables as the columns of the 100×48 matrix?. If so how to write the bounds and objective function. I am using ga solver.
  2 件のコメント
Walter Roberson
Walter Roberson 2018 年 8 月 8 日
To confirm, you are optimizing on 4800 variables?
Mondeep maz
Mondeep maz 2018 年 8 月 8 日
4800 variables arranged in a matrix of 100×48

サインインしてコメントする。

採用された回答

J. Alex Lee
J. Alex Lee 2018 年 8 月 8 日
That doesn't seem like a mathematically well-posed optimization problem...but in general Matlab's fminX routines are multidimensional. Maybe you can just reshape to achieve your goal?
x0 = rand(100,48) % initial guess of unknowns to solve for
y = rand(48,1) % your parameters governing the optimization
x = fminX(@(x)objFn(x,y),x0(:)) %
function r = objFn(x,y)
x = reshape(x,100,48); % or compute the correct dimensions based on numel(x) and length(y)
r = sum(x*y); % or do you want sum(abs(x*y))?
end
you would similarly reshape your bounds into vectors.
Or, a quick search reveals that Matlab's fminX functions actually do accept matrix arguments: https://www.mathworks.com/help/optim/ug/matrix-arguments.html.

その他の回答 (0 件)

カテゴリ

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