how to generate a uniform distribution with an constraint

3 ビュー (過去 30 日間)
xueqi
xueqi 2013 年 7 月 30 日
Dear fellows,
I want to do a simulation. There are two variables c1 and c2. And they satisfy a function f(c1,c2)=constant. Assuming c1 and c2 are uniformally distributed along the function f(c1,c2)=constant, how can I realize this?
Cheers, X

採用された回答

Iain
Iain 2013 年 7 月 30 日
Rearrange the function into the form:
c2 = g(c1,constant),
Randomly generate c1, and simply calculate c2, based on the constant you know.
  1 件のコメント
xueqi
xueqi 2013 年 7 月 30 日
Ha that is smart! Thank you!

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by