Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How do I use a sparse matrix that was returned by a mex file?
Replies: 5   Last Post: Mar 10, 2013 10:39 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
James Tursa

Posts: 2,196
Registered: 8/5/09
Re: How do I use a sparse matrix that was returned by a mex file?
Posted: Mar 9, 2013 1:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Alejandro " <aortizb@ing.uchile.cl> wrote in message <khfcj2$ij1$1@newscl01ah.mathworks.com>...
> Hi all,
> Say I created a sparse matrix (say K) in a mex file and returned to matlab environment. I read that sparse matrix has no information of the sparsity and cannot be used in any other matlab function that uses a sparse matrix.

Wrong. If the sparse matrix was created correctly in the mex routine, you can use it just like any other sparse matrix that was created at the m-file level. You can use the FEX function spok to see if it was built properly:


James Tursa

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.