Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: How do I use a sparse matrix that was returned by a mex file?

$
0
0
> > What is not clear to me is the following. If only the sparse matrix that is created inside the mex function is returned to the matlab environment, how does matlab know the internal structure of that sparse matrix? do I have to return something else like ir and jc?
>
> Inside the mex function you are required to fill in the pr, pi (if complex), ir, and jc arrays manually. If you do it correctly, the result will be a sparse matrix with the exact internal structure as if it was created at the m-file level.
>
> James Tursa


Thank you! Now I am confident with this.

Viewing all articles
Browse latest Browse all 19628