You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: BitErrorProbabilityDoublyFlatRayleigh.m
    path of file: ./repos/FBMC/Theory
    
    the code of the file until where you have to start completion: % Ronald Nissel, rnissel@nt.tuwien.ac.at
% (c) 2017 by Institute of Telecommunications, TU Wien
% www.tc.tuwien.ac.at    

% This function calculates the bit error probability for an arbitrary
% signal constellation in a doubly flat rayleigh channel.
% It is based on "OFDM and FBMC-OQAM in doubly-selective channels:
% Calculating the bit error probability", R. Nissel and M. Rupp, IEEE
% Communications Letters, 2017
function BitErrorProbability = BitErrorProbabilityDoublyFlatRayleigh(...
    SNR_dB, ...       % The SNR in the complex domain => SNR_FBMC = SNR_OFDM-3dB.
 
    
function calculates the Probability that the complex Gaussian ratio
% y/h is within the rectrangular region "(zRlower zIlower] x (zRupper
% zIupper]". It requires the function "GaussianRatioCDF"
function Probability = GaussianRatioProbabilityRectangularRegion(...
    Ey2,...             % Expectation{|y|^2}
    Eh2,...             % Expectation{|h|^2}
    Eyh,...             % Expectation{y*conj(h)}
    zRlower,...         % Determines the rectangular region
    zRupper,...
    zIlower,...
    zIupper)


    CDF_RegionA = GaussianRatioCDF(Ey2,Eh2,Eyh,zRupper,zIupper);
    CDF_RegionB = GaussianRatioCDF(Ey2,Eh2,Eyh,zRlower,zIlower);
    CDF_RegionC = GaussianRatioCDF(Ey2,Eh2,Eyh,zRlower,zIupper);
    CDF_RegionD = GaussianRatioCDF(Ey2,Eh2,Eyh,zRupper,zIlower);
    
    Probability = CDF_RegionA+CDF_RegionB-CDF_RegionC-CDF_RegionD;
    
end