help-octave
[Top][All Lists]
Advanced

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

Re: reading matrix-market format files in octave


From: Ozzy Lash
Subject: Re: reading matrix-market format files in octave
Date: Fri, 1 Dec 2006 13:53:29 -0600

On 12/1/06, david moloney <address@hidden> wrote:
I tried including the mmread and mmwrite files downloaded from
http://math.nist.gov/MatrixMarket/mmio/matlab/mmiomatlab.html
in my Octave search path.  These .m files however generate errors and do not
appear to be compabible with octave syntax.  Is there some other way of
reading .mtx files in Octave?


Which version of Octave are you using?  mminfo and mmread seem to work
fine with the latest octave-2.9.9 and the associated octave-forge
packages for debian unstable.  I didn't try mmwrite.  I only tried it
against the 1138_bus.mtx matrix.  Here is a snippet of the results:

octave-2.9.9:1> [rows,cols,entries,rep,field,symm]=mminfo("1138_bus.mtx")
rows =  1138
cols =  1138
entries =  2596
rep = coordinate
field = real
symm = symmetric

octave-2.9.9:2> A=mmread("1138_bus.mtx")
A =

Compressed Column Sparse (rows = 1138, cols = 1138, nnz = 2596)

 (1, 1) ->  1474.8
 (5, 1) -> -9.0171
 (563, 1) -> -5.7307
 (2, 2) ->  9.1367
 (10, 2) -> -3.4060
 (563, 2) -> -5.7307
 (3, 3) ->  69.615
 (11, 3) -> -8.8106
 (34, 3) -> -31.153
 (35, 3) -> -16.067
 (104, 3) -> -4.8693
 (475, 3) -> -8.7154
 (4, 4) ->  68.601
 (7, 4) -> -34.620
 (27, 4) -> -0.47551
 (101, 4) -> -28.665
 (102, 4) -> -0.74632
 (103, 4) -> -4.0940
 (5, 5) ->  13.888
 (9, 5) -> -4.8709
 (6, 6) ->  116.83
 (7, 6) -> -10.961
 (37, 6) -> -56.818
.
.
.


reply via email to

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