The following MATLAB codesnipet implement large scale matrix multiplications(2 sec /10 ):
tic %comment:2 sec for i =1:10 G0 = K*sparse( diag(f>0) )*K\';