[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Importing a sparse matrix to Octave
From: |
Chong Yidong |
Subject: |
Re: Importing a sparse matrix to Octave |
Date: |
Fri, 24 Jul 2009 20:07:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) |
"John W. Eaton" <address@hidden> writes:
> On 24-Jul-2009, Jaroslav Hajek wrote:
>
> | No, not yet. A futher requirement is that the row indices should be
> | sorted (for a certain column index).
>
> Is that necessary? For example, loading
>
> # name: s
> # type: sparse matrix
> # nnz: 5
> # rows: 10
> # columns: 10
> 1 1 1
> 6 2 6
> 4 2 4
> 5 2 5
> 3 6 3
>
> appears to work.
No, Jaroslav's right. If the indices are out of order, some kind of
corruption takes place that prevents some matrix operations. With the
above file:
octave:1> load "foo.dat"
octave:2> [L,U] = splu(s)
error: SparseLU::SparseLU symbolic factorization failed
warning: Invalid matrix type
If I re-order the file as
# name: s
# type: sparse matrix
# nnz: 5
# rows: 10
# columns: 10
1 1 1
4 2 4
5 2 5
6 2 6
3 6 3
then the LU factorization proceeds without an error.
- Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24
- Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave, Jaroslav Hajek, 2009/07/24
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave,
Chong Yidong <=
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/29
- Re: Importing a sparse matrix to Octave, Carlo de Falco, 2009/07/24
- Re: Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24