4 lines
126 B
Mathematica
4 lines
126 B
Mathematica
|
function X = sigmrnd(P)
|
||
|
% X = double(1./(1+exp(-P)))+1*randn(size(P));
|
||
|
X = double(1./(1+exp(-P)) > rand(size(P)));
|
||
|
end
|