help-octave
[Top][All Lists]
Advanced

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

Re: matlab "sparse" function


From: Andy Adler
Subject: Re: matlab "sparse" function
Date: Sun, 1 Feb 1998 09:56:20 -0500

Pablo Ledesma wrote:

> Is there anything similar to the matlab "sparse" function in octave?
>
> Thanks,
> Pablo

Last year I announced version 0.10 of my sparse matrix package.
I can do most of the MATLAB sparse math except for the more
exotic functions like svd on sparse.

Currently the notation is a little bizarre, but it works and is slightly
faster than MATLAB. (or so my preliminary tests indicate)

Here is my post on octave-sources or 23 nov 98.

________________________________________________

After announcing I was working on it about 6 times:
I present version 0.10 of my sparse matrix package.

Here is some sample code (from the test scripts I 
provide with the package)

   CCt=       spfun(CC,'trans');
   CCtSS=     spfun(CCt,'mul',SS);
   ZZ=        spfun(CCtSS,'mul',CC);
   ZZs=       spfun(ZZ,'extract',2,n,2,n);
   QF=        full(spfun(QQ,'extract',2,n,1,p));
   VV=        spfun(ZZs,'solve',QF,2);

which is equivalent to the MATLAB code

   ZZ=        CC'*SS*CC;
   ZZs=       ZZ(2:n,2:n);
   QF=        full(QQ(2:n,:));
   VV=        ZZs\QF;

The conversion functions: sparse, full, etc are provided.

You can download the package from
http://www.mondenet.com/~adler/octave/spfun/



have fun,

andy



reply via email to

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