Go to the source code of this file.
Functions |
| | disp ("\n----------- Tests on Sparse Matrix ------------") |
| | disp ("\nThe input sparse matrix is:") |
| | disp (mati) |
| | disp ("\nCalling sparse_double_matrix_test...") |
| | disp ("Finishing the call...") |
| | disp ("\nThe result sparse matrix (non-zero elements) is:") |
| | disp (mato) |
| | if (mato==expected) disp("\nSparse double matrix test passed.\n") |
| else | disp ("\nSparse double matrix test failed.\n") |
| end | disp ("---------------- Tests Done ----------------\n") |
Variables |
| | fname = "sparse_double_matrix_test" |
| | m = 3 |
| | n = 3 |
| | mati = sprand(m, n, 0.2) * 100 |
| | expected = mati + spones(mati) |
| | nnzi = nnz(mati) |
| | nnzo = nnzi |
Function Documentation
| disp |
( |
"\n----------- Tests on Sparse Matrix ------------" |
|
) |
|
| end disp |
( |
"---------------- Tests Done ----------------\n" |
|
) |
|
| else disp |
( |
"\nSparse double matrix test failed.\n" |
|
) |
|
| disp |
( |
"\nThe input sparse matrix is:" |
|
) |
|
| disp |
( |
"\nThe result sparse matrix (non-zero elements) is:" |
|
) |
|
| disp |
( |
"Finishing the call..." |
|
) |
|
| disp |
( |
"\nCalling sparse_double_matrix_test..." |
|
) |
|
Variable Documentation
| fname = "sparse_double_matrix_test" |
| mati = sprand(m, n, 0.2) * 100 |