Generate same random permutations (reshape) for sequence?
9 ビュー (過去 30 日間)
古いコメントを表示
I amlooking for a way genrate random permutation function for X and Y.
Example:
X = randi ([0 1], 10,1);
Y = bsc(A, 0.05);
If I reshape the data
reshape([X;Y],1,[]);
0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0
but here I want X Y reshape row wise
like
0 0
0 1 ....etc
Someone could help me.
0 件のコメント
回答 (1 件)
madhan ravi
2018 年 12 月 17 日
a=[0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0];
reshape(a,2,[])'
4 件のコメント
madhan ravi
2018 年 12 月 18 日
編集済み: madhan ravi
2018 年 12 月 18 日
Thank you Jan , @Barbossa if you got the answer to your question make sure to accept the answer so that people know the question is solved.
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!