Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: How do I use a sparse matrix that was returned by a mex file?
Posted:
Mar 9, 2013 1:09 PM
|
|
"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:
http://www.mathworks.com/matlabcentral/fileexchange/20186-spok-checks-if-a-matlab-sparse-matrix-is-ok
James Tursa
|
|
|
|