% This function is to generate a zero mean laplace random matrix (m,n)

function a = randlap(var,m,n)


b=var;
rand_normal_matrix=rand(m,n);



for i=1:m
    
    for k=1:n
        
        c=rand_normal_matrix(i,k);
        
        if c < (1/2)
            
            
        a(i,k) = b*log(  2*c );
   
        elseif c > (1/2) 
            
           a(i,k) =-b*log( 2 * ( 1-c ) );
        
        else 
            
           a(i,k) = (1/2);
        
        end
        
        
        
        
        
    end
end
