help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

View matrix in CSR / CSC format


From: Martin Beseda
Subject: View matrix in CSR / CSC format
Date: Fri, 4 Dec 2015 11:28:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

Hello everybody,

I'm aware, that this is a very beginner's question, but still, I couldn't find an answer.

So, is it possible to print a matrix in CSR/CSC format and not just with coordinates?

Example:
This is the usual output:

Compressed Column Sparse (rows = 6, cols = 4, nnz = 5 [21%])

  (3, 1) -> -0.27009
  (6, 1) ->  0.48917
  (2, 2) -> -1.5882
  (3, 2) ->  0.20523
  (5, 3) -> -0.85492

But I'd like to see something like this:

colpointers = {1, 3, 5, 6}
rowindices = {3, 6, 2, 3, 5}
values = {-0.27009, 0.48917, -1.58820, 0.20523, -0.85492}

Thank you very much for your answer,
Martin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]