making permutations in row elements in a matrix
显示 更早的评论
Hi all,
I have an nxm matrix. I need to make permutations but the row sums must be fixed.
Example;
Original matrix = [15 20; 10 30; 40 30; 50 10; 15 35]
row sums: 35,40,70,60,50.
One of the permutations; [10 25; 20 20; 50 20; 25 35; 20 30]
row sums: 35,40,70,60,50 (row sums must be fixed).
How can I generate permutations like this? Will permutation test work?
If I generate my original matrix with random numbers taken from a specific distribution , how can I permutate the row elements -with holding the row sums fixed-?
Thanks..
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Prediction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!