   function [y] = csc_matvec(CSC, x) 
%% function [y] = csc_matvec(CSC, x) 
%% matvec in csc format -- 
%% for illustration only 
rr = CSC.rr;  ii = CSC.jj; ptr = CSC.ptr;
n = CSC.n;  m = CSC.m; 
y = zeros(m,1); 
for j = 1:n
    for k = ptr(j):ptr(j+1)-1
        y(ii(k)) = y(ii(k)) + x(j)*rr(k);
    end
end

