Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Convert array of class 'int8' to sparse
Date: Tue, 24 Mar 2009 18:18:07 +0000 (UTC)
Organization: Boeing
Lines: 7
Message-ID: <gqb84v$m5g$1@fred.mathworks.com>
References: <gfhh6c$dvr$1@fred.mathworks.com> <gq9bg5$3ra$1@fred.mathworks.com> <gqa8th$7j0$1@fred.mathworks.com> <gqae67$vg$1@fred.mathworks.com> <gqaqc5$l2k$1@fred.mathworks.com> <gqarna$pv1$1@fred.mathworks.com> <gqb07m$aau$1@fred.mathworks.com> <gqb751$a7b$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1237918687 22704 172.30.248.37 (24 Mar 2009 18:18:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 24 Mar 2009 18:18:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:527351


"James Tursa" <aclassyguywithaknotac@hotmail.com> wrote in message <gqb751$a7b$1@fred.mathworks.com>...
>
> ...MATLAB only supports sparse matrices of double ... it does *not* support sparse matrices of any other class...

I meant for the operations you are interested in (addition, subtraction, etc.). MATLAB *does* of course support logical sparse matrices. Since the storage class behind the scenes for logical sparse matrices is 1-byte, I suppose this could be used as a starting point for a custom sparse int8 or uint8 class, and then write c-mex code to do the operations. But again, this would be quite a bit of work ...

James Tursa