Hello! I'm trying to solve a sparse linear system A*x=b (A=,b,x=) and I've got a while loop with all the intermediate steps to find the solution. What I'm trying to do is to save in a vector all the intermediate steps.
maximum number of iterations 2000
while max(abs(xnew-x))>tol && k <2000,
But I get an error message: "Subscript indices must either be real positive integers or logicals." (About the line that says" xdata(counter)=xnew;
Thanks in advance!