フィルターのクリア

Generating a random matrix with non-static constraints

1 回表示 (過去 30 日間)
maryam si
maryam si 2015 年 3 月 7 日
コメント済み: maryam si 2015 年 3 月 7 日
Hi,
I would like to generate a random matrix with constraints on both rows and columns. But the problem is I have two parameters for this constraints which are not fix for each element. For explanation, consider the mxn matrix P = [P1 ; P2; ...; Pm], and 2 other vectors lambda and Mu that they should have this constraints:
1. sum of lambda(s) < sum of Mu(s) Now for the random matrix P:
2. each element of the matrix(P[j,i]) should be equal or greater than zero.
3. sum of the elements of each row is equal to one (i.e. for the row of j: sigma_i(P[j,i] = 1)
4. for each column j, sum of the production of each element with the correspond lambda(j) is less than the correspond element in the Mu vector (i.e.Mu(i)). i.e. for the column of i: sigma_j(P[j,i]*lambda(j)) < Mu(i)
I have tried coding all these constraints but because the existence of lambda and Mu vectors, just one of the constraints of 3 or 4 can be feasible. May you please help me for coding this matrix.
Thanks in advance

回答 (1 件)

Konstantinos Sofos
Konstantinos Sofos 2015 年 3 月 7 日
  1 件のコメント
maryam si
maryam si 2015 年 3 月 7 日
Hi
thanks for your answer. I had seen that code and tried to convert to my problem, but in my matrix I have two parameters lambda and Mu that are not constant. In that code, it is suffice that the sum of each column be in a constant interval of [a,b], but my intervals are [0 Mu(i)] and the elements are products with lambda(j)s. But, may be I didn't understand the function of that code very well..
Regards

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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by