Generate matrix with different values from another matrix

2 ビュー (過去 30 日間)
Anya
Anya 2014 年 7 月 2 日
コメント済み: Anya 2014 年 7 月 2 日
Hi all,
I would to have matrix A = m x n with dimensions in dependency of user input. Moreover, I have second vector with dimensions B = m x 1, filled with probabilities from 0, 0.5, 0,6 ... etc. also in dependency of user input. How can I generate matrix A which will have columns with different probabilities from vector B?
For example I would like to have matrix A filled with zeros and ones, but I want that every column has different probability of how ones and zeros are generated .
Thanks
  2 件のコメント
Jos (10584)
Jos (10584) 2014 年 7 月 2 日
This is confusing. You simultaneously state that you have a matrix A and you want to generate a matrix A.
How does A corresponds to B?
Can you give a very small example (with m < 4) of the input and the expected output?
Anya
Anya 2014 年 7 月 2 日
Hi, sorry I wanted to say I would like to have matrix A generated in that way that every column has different probability how its filled with zeros and ones. I edited my question above, I hope that is understandable now.

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

回答 (0 件)

カテゴリ

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