File: test_write_allzero_sparse.m

package info (click to toggle)
libmatio 1.5.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,648 kB
  • sloc: sh: 126,066; ansic: 22,606; makefile: 646; python: 215
file content (17 lines) | stat: -rw-r--r-- 403 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
try
    load test_write_allzero_sparse.mat
    expdata = zeros(5,10);
    pass = true;
    pass = pass && isa(sparse_matrix,class(expdata));
    pass = pass && issparse(sparse_matrix);
    pass = pass && all(size(sparse_matrix)==size(expdata));
    pass = pass && all(sparse_matrix(:)==expdata(:));
catch me
    pass = false;
end
if pass
    fprintf('PASSED\n');
else
    fprintf('FAILED\n');
end
exit;