How can I write a sparse matrix’s non-zero values and the corresponding row and column information to a text file?
I define a sparse identity matrix, using the SPEYE command as follows:
A = speye(5)
and receive the following output:
A =
(1,1) 1
(2,2) 1
(3,3) 1
(4,4) 1
(5,5) 1
I would like to write the non-zero elements as well as the row and column information corresponding to the non-zero elements to a text file.I define a sparse identity matrix, using the SPEYE command as follows:
A = speye(5)
and receive the following output:
A =
(1,1) 1
(2,2) 1
(3,3) 1
(4,4) 1
(5,5) 1
I would like to write the non-zero elements as well as the row and column information corresponding to the non-zero elements to a text file. I define a sparse identity matrix, using the SPEYE command as follows:
A = speye(5)
and receive the following output:
A =
(1,1) 1
(2,2) 1
(3,3) 1
(4,4) 1
(5,5) 1
I would like to write the non-zero elements as well as the row and column information corresponding to the non-zero elements to a text file. MATLAB Answers — New Questions