function extrstat(n) % generates extreme points of the symmetric stationary measures % which is a convex, compact set global PP %PP = zeros(2^n,0); PP = randbinsym(n); while 1 P = randbinsym(n); P1 = repmat(P,[1, size(PP,2)]); d = min(sum(abs(PP-P1))); if d > 1e-5 PP = [PP,P]; nextr = size(PP,2) end end return