11.07.2015 Views

Introduction to Sparse Matrices In Scilab - Projects

Introduction to Sparse Matrices In Scilab - Projects

Introduction to Sparse Matrices In Scilab - Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>In</strong>formation about MatrixMarket file :C:\ Users \ myname \ AppData \ Local \ Temp \ SCI_TMP_8216_ /A. mtx%%% Generated by <strong>Scilab</strong> 11 -Jun -2010s<strong>to</strong>rage : coordinateentry type : complexsymmetry : hermitian=====================================<strong>In</strong> the following session, we use another calling sequence of the mminfo function<strong>to</strong> extract data from the file. This allows <strong>to</strong> get the number of rows rows,the number of columns cols, the number of entries and other informationsas well.-->[rows ,cols , entries ,rep , field ,symm , comm ] = mminfo ( filename )comm =%%% Generated by <strong>Scilab</strong> 11 -Jun -2010symm =hermitianfield =complexrep =coordinateentries =6.cols =4.rows =4.<strong>In</strong> the following session, we use the mmread function <strong>to</strong> read the content ofthe file and create the matrix A. We use the nnz function <strong>to</strong> compute thenumber of nonzero entries in the matrix.-->A= mmread ( filename )A =( 4, 4) sparse matrix( 1, 1) 9.( 1, 3) 27. + 1.i( 2, 2) 16.( 3, 1) 27. - 1.i( 3, 3) 145.( 3, 4) 88.( 4, 3) 88.( 4, 4) 121.-->nnz (A)ans =26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!