Finding maximum across arrays with constraints

2 ビュー (過去 30 日間)
Brian
Brian 2016 年 3 月 10 日
コメント済み: Brian 2016 年 3 月 10 日
Hello community,
I am trying to solve a maximum problem with constraints. I have 3 arrays: A(a,x,y), B(b,x,y), C(c,x,y). In short, x, y are input parameters and a, b, c are respective outputs. I want to find the x, y values that gives me the maximal value of a. But the constraint is that the same x, y value pair need to lead to b and c values less than b_threshold and c_threshold, respectively. I am not sure where to begin as I am quite new to MatLab. Very grateful for any inputs and suggestions! Thank you very much!
  1 件のコメント
Star Strider
Star Strider 2016 年 3 月 10 日
Are they arrays or functions?
Arrays — at least the ones I’ve encountered — don’t have inputs and outputs.
So is:
a = A(x,y)
and so for the others? Are ‘x’, ‘y’ and ‘a’ vectors or scalars?

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

採用された回答

KSSV
KSSV 2016 年 3 月 10 日
It should be an easy task. Get the intersection of (x,y) of B and C. Let this intersection be (xBC,yBC). Do again intersection of (xBC,yBC) with (x,y) of A. And then get the maximum 'a' from this intersection with thresholds. This works if A, B, C are of different sizes. If they are of same dimension. do intersection by using threshold values and get the maximum 'a'.
  1 件のコメント
Brian
Brian 2016 年 3 月 10 日
Got it! Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by