Dear all, I have a matrix which is a transition matrix. I need to calculate the time evolution of the associated probability distribution. The matrix is raised to 't', the time variable and I want to evaluate the matrix at different time steps. Is it possible in Matlab? The code to generate the square matrix is given below which is working well for a given value if t.
if true N=3;w=0.2;t=1;G=zeros(N);for j=1:N %rows
for n=1:N %columns
for k=1:N %summation
G(j,n)=G(j,n)+1/N*(((1-w)+w*cos((2*pi*k)/N)).^t*cos((2*pi*(j-n)*k)/N)); end endenddisp(G)end
Best Answer