This semster, I have been studying the iterative methods for large sparse matrix system. But I have some questions. For large sparse matrix, we must use an economic storage to store them. The most popular way is the compressed row storage or compressed column storage, i.e., CRS,CCS format which have been proved as the most economic way. When we use the iterative method to solve Ax=b, we must repeatedly compute the matrix-vector mulitiplication Ax. So, first we must store the sparse matrix $A$ in CRS,or CCS format, then we have to write a subroutine to compute the matrix-vector, which is so troublsome during our coding. But when I read the matlab routines about iterative methods, e.g., GMRES,MINRES,PCG, downloaded from website, I found that the author just use the matlab operation ' * ', to compute the matrix-vector multiplication, Ax, where matrix $A$ is a sparse format in matlab. For example, to compute $y=A*x$:
n=4;
A = gallery('poisson',n);
x=rand(n^2,1);
y=A*x
As for the similar code in matlab, I found that there is nobody write a single subroutine to compute the matrix-vector $A*x$. I do not understand that because in many monographys about iterative methods for large sparse matrix, they always discuss the sparse matrix storage and the economic way of computing matrix-vector. But I found no one do that when using matlab. Why this? because of using matlab? or other reasons?
If we do not use matlab, e.g., use C,Python, or Fortran language, can we still use the simple way y=A*x like matlab? any suggestions are welcome.