User:Eml4500.f08.FEABBQ.Jayma/HW1

Jose's Contribution to HW#1
This is me finishing what Grant started...

Section 19 - Sparse Matrix Computations
Matlab typically handles matrices of which the contents are mostly nonzero. These matrices are considered "dense". A matrix with mostly zero entries is considered "sparse" and is worth defining for the possibility of ignoring the zero values and operating on the nonzero values only. The benefit of this is to reduce the memory footprint of the matrix and the computation time. Suppose a matrix is created by the following command, and that the matrix is filled with mostly zeros by the following command, the output of which looks like The nonzero values of the matrix can be easily found with the command, followed by the output, The following commands will return the matrix to it's previous form and check it's storage mode, respectively Sparse matrices can also be generated directly as opposed to calling the sparse function on a full ("dense") matrix. A sparse diagonal matrix can be generated with the  command. The output is similar to calling the. are the sparse analogs of, respectively. A more specific approach would be to define the nonzero values of the sparse matrix individually. For example (followed by output) The nonzero entities were stored in the row vector. Another example of directly defining the nonzero values of a sparse matrix is The output of Matlab arithmetic and functions will be in one of the two storage modes (either Full(F) or Sparse(S)). The following defines the output results of the manipulation done to either full or sparse matrices