x = randi([0 1],1,12)'; % add random data X = step(hGen, x); % data + CRC transmitted
% Passes the binary input signal data through a binary symmetric channel with error probability p.
Y = bsc(X, p);
[xx,yy]=step(hDetect,Y); % transmission with errors
% False alarm if yy==1 %Even if there are any errors, it keeps running z=z+1; end
if xx==x & yy==1 % But if, while running showing errors, it shows that c=c+1; % received and transmitted data are the same, when in fact PFA=c/z; % they are not, it should calculate the False alarm probability. end