help-octave
[Top][All Lists]
Advanced

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

Re: View matrix in CSR / CSC format


From: Bård Skaflestad
Subject: Re: View matrix in CSR / CSC format
Date: Fri, 4 Dec 2015 11:33:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 04/12/15 11:28, Martin Beseda wrote:
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?

I don't think there's a built-in printing format that does what you want, but you can get at the information through a little manual work:

   [i, rowindices, values] = find(A);
   colpointers = cumsum([1 ; accumarray(i, 1)]);


Sincerely,
--
Bård Skaflestad <address@hidden>
SINTEF ICT, Applied Mathematics



reply via email to

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