|
"Kyaw " <kyawtuns@gmail.com> wrote in message <he2fuf$3e9$1@fred.mathworks.com>...
> I am also interested in this question.
>
>
> matayl@inr.net (Matt Taylor) wrote in message <357a0a5c.41056784@news.inr.net>...
> > Is there any way to create a sparse array with more than two
> > dimensions? Sparse.m doesn't seem to have that capability.
> >
> > Does anybody know whether Mathworks has any plans of implementing the
> > multidimensional functionality in the sparse matrix functions?
> >
> > Does anybody have any ideas for work-arounds?
> >
> > I am using MATLAB 5.2 on a PC, running Windows95.
> >
> > Thanks,
> > Matt Taylor
Here is a VERY OLD post from a user who created an n-d sparse matrix object. I actually remember using this several years ago. I have no idea of it would still work. Caveat emptor.
%%%%%%%%%%%%%%%
Last fall I wrote code for an object class that creates a
multidimensional sparse array data type in Matlab, which I call
ndsparse. I make no claims that it is efficient but it seems to work
well. I was hoping for some comments from the Mathworks people I sent it
to but I've gotten no reply back from any of them. The code was beta
tested by several users and found to be mostly free from problems. My
goal was to create a data type that would act identically to full
matrices. There are however some remaining inconsistencies concerning
how the two data types handle empty dimensions. I don't have the time to
track these down however as I am not actively using the data type right
now.
Anyone that wants to use this data type is welcome to the code, which is
downloadable from
http://www4.ncsu.edu/~pfackler/ndsparse.zip
The zip file contains documentation.
Cheers,
Paul
--
Paul L. Fackler
Department of Agricultural and Applied Economics
North Carolina State University
Raleigh NC 27695-8109
phone: 919-515-4535
fax: 919-515-1824
email: paul_fackler@ncsu.edu
web site: www4.ncsu.edu/~pfackler
|