function [A,B] = discretization(M,K,C,dt,method,nu,sigma)

    switch method
    
        case 1 % Crank-Nicholson 
        A = M + 1/2*dt*(C + nu*K + sigma*M);
        B = -dt*(C + nu*K + sigma*M);
        
        case 2 %Pade R22
        W=(1/24)*[7 -1; 13 5];
        
        w=(1/2)*[1;1];
        
         A = [M+dt*W(1,1)*(C+nu*K+sigma*M),dt*W(1,2)*(C+nu*K+sigma*M);
              dt*W(2,1)*(C+nu*K+sigma*M),M+dt*W(2,2)*(C+nu*K+sigma*M)];

        B = [-dt*(C + nu*K + sigma*M)*w(1); -dt*(C + nu*K + sigma*M)*w(2)];
    end
    

end