5.0

5.0 | 2 ratings Rate this file 118 downloads (last 30 days) File Size: 15.19 KB File ID: #20186

spok: checks if a MATLAB sparse matrix is OK

by Tim Davis

 

05 Jun 2008 (Updated 20 Aug 2008)

BSD License  

Useful for mexFunction authors only

Download Now | Watch this File

File Information
Description

This function is very helpful for authors of mexFunctions that return sparse matrices to MATLAB. It is of no use at all to those who work purely with M-files (if you do not write C mexFunctions, please don't bother downloading or rating this file).  
 
A MATLAB sparse matrix is stored in a compressed-column form that can be difficult to generate in a C or Fortran mexFunction. This function, spok, will determine if your matrix is valid. You can also call the C spok function from inside your mexFunction.

MATLAB release MATLAB 7.6 (R2008a)
Zip File Content  
Other Files spok/Contents.m,
spok/private/spok_invalid.c,
spok/private/spok_invalid.mexw32,
spok/spok.c,
spok/spok.h,
spok/spok.m,
spok/spok.mexw32,
spok/spok_install.m,
spok/spok_mex.c,
spok/spok_test.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
01 Dec 2008 Qun HAN Great work. But the submmited file is in c. I want to know if a MATLAB sparse matrix is passed into a FORTRAN mex file how to indexing it?
Please login to add a comment or rating.
Updates
20 Aug 2008 Removed POSIX standard function "snprintf" which Microsoft doesn't comprehend. Should now work on Windows.
Tag Activity for this File
Tag Applied By Date/Time
linear algebra Tim Davis 22 Oct 2008 10:04:54
sparse Tim Davis 22 Oct 2008 10:04:54
mex Tim Davis 22 Oct 2008 10:04:54

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com