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