matio-1.5.30/test/matlab/test_write_allzero_sparse.m
raw| 1 | try |
| 2 | load test_write_allzero_sparse.mat |
| 3 | expdata = zeros(5,10); |
| 4 | pass = true; |
| 5 | pass = pass && isa(sparse_matrix,class(expdata)); |
| 6 | pass = pass && issparse(sparse_matrix); |
| 7 | pass = pass && all(size(sparse_matrix)==size(expdata)); |
| 8 | pass = pass && all(sparse_matrix(:)==expdata(:)); |
| 9 | catch me |
| 10 | pass = false; |
| 11 | end |
| 12 | if pass |
| 13 | fprintf('PASSED\n'); |
| 14 | else |
| 15 | fprintf('FAILED\n'); |
| 16 | end |
| 17 | exit; |