SAREK - Sparse Analyzer Real Et Komplex

版本 1.00 (19.7 KB) 作者: James Tursa
The SAREK function analyzes a sparse matrix for integrity. Useful especially for checking sparse matrices built by 3rd party s/w.
5.0 次下载
更新时间 2024/1/23

查看许可证

The sarek function analyzes a sparse matrix for integrity. Patterned after the original spok function by Tim Davis. Requires a C compiler to compile the C source code sarek.c into a mex routine. Should work for both R2017b- and R2018a+ MATLAB versions, but I am only able to test the R2018a+ version currently. Let me know if you find any issues. Self building.
Syntax:
bad = sarek(s)
Where s = A sparse matrix (real or complex, double or logical)
bad = Number of errors found
Checks for the following errors:
M < 0
N < 0
Nzmax < 1
Jc = NULL
Jc[0] ~= 0
Jc[N] > Nzmax
(M==0 || N==0) && Jc[N] ~= 0
Jc[j] < Jc[j-1]
Ir == NULL && Jc[N] > 0
Jc[j] > Nzmax
Ir[i] < 0 || Ir[i] >= M
Ir[i] <= Ir[i-1]
Pr == NULL && Jc[N] > 0
Pi == NULL && Jc[N] > 0
Pr[i] = 0 for real or logical matrices
Pr[i] = 0 && Pi[i] == 0 for complex matrices

引用格式

James Tursa (2024). SAREK - Sparse Analyzer Real Et Komplex (https://www.mathworks.com/matlabcentral/fileexchange/158161-sarek-sparse-analyzer-real-et-komplex), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2023b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.00