Function for Generating bistochastic matrix ?
Show older comments
Bistochastic matrix P is matrix where the sum each column or each row is 1, and aslo for n>=0 P^n is also bistochastic,
Another definition : a stochastic matrix P is bistochastic if P' is also stochastic . the question is :
Is there any predefined or sophisticated function to generate such matrices ?
I already tried a method using "magic" function :
>>H=magic(10); % say we want a Bistoch of dimension n
>>N=sum(H(1,:)); % to get the Unique SUM
>>P=H/N;
Cordially
6 Comments
Matt J
on 17 Mar 2013
Is there any predefined or sophisticated function to generate such functions ?
Generate them from what?
Youssef Khmou
on 17 Mar 2013
Cedric
on 17 Mar 2013
The "magic" solution seems to be quite efficient already; did you ask because you need to be able to generate random bistochastic matrices?
Youssef Khmou
on 17 Mar 2013
Cedric
on 17 Mar 2013
Hi Youssef, I asked precisely because of the regularity. I have no clean solution, but if I had to find some solution quickly, I would certainly go for yours, using two successive RANDPERM to permute rows and columns. It would not be optimal, but ok for a temporary approach I guess.
Youssef Khmou
on 17 Mar 2013
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!