root/applications/dual/SIDP/smc29/my_sample.m @ 1344

Revision 1255, 175 bytes (checked in by zimamiro, 14 years ago)
Line 
1function x_0=my_sample(vahy,x_1)
2N=size(vahy,2);
3F= (vahy*triu(ones(N,N),0));
4u=rand(1,N)';
5index=min(N-sum((ones(1,N)'*F-u*ones(1,N))>0,2)+1,N);
6x_0=x_1(:,index);
7end
Note: See TracBrowser for help on using the browser.