MATLAB: How to set this iterative multiplication of a matrix with a column vector

euclidean norml1 vector normMATLAB Production Servermatrix iterative multiplication

Hello, this is my first post in this community 🙂 I am managing to get to work an iterative multiplication of a matrix with a column vector; below the image of what has to be:
the partial results has to be saved in another matrix; I need to know at what t the last partials in some way converge. Thank you.

Best Answer

r_old = [1/3; 1/3; 1/3];
M = [1/2 1/2 0; 1/2 0 1; 0 1/2 0];
epsilon = 1;
while epsilon > 1e-5
r_new = M*r_old ;
epsilon = norm(r_new-r_old,1);
r_old = r_new;
end
r_new
Best wishes
Torsten.