Hello,
I try to discretize this AR(1) process: y_t = \rho y_{t1} + \epsilon_t
where \rho=0.8014, \epsilon_t \sim N (0, 0.1849)
I use Matlab, and my friend uses Python, and we got different result. I don’t know where did I get wrong. I post here both Python and Matlab code.
If anyone discover something wrong, plz kindly let me know. I am really appreciate!

With Python: self.mc = qe.markov.tauchen(0.8014,0.43, 2.5, 5)

With matlab:
N = 5
rho = 0.8014
sigma=sqrt(0.1849)
m=2.5
[Z,Zprob]=tauchen(N,rho,sigma,m)
function [Z,Zprob]= tauchen(N,rho,sigma,m)
Z = zeros(N,1); %column vector of state values in state space, N states
Zprob = zeros(N,N); %transition matrix
Z(N)=2.5sqrt(sigma^2/(1rho^2));
Z(1)=Z(N);
zstep=(Z(N)Z(1))/(N1);
for i=2:N1
Z(i)=Z(1)+zstep(i1);
end