Double in matlab (simple)
Sparse double is a double-precision floating-point number (matrix) with sparse storage mode.

The so-called sparse matrix refers to a matrix with most elements of 0. If this matrix is stored in a conventional way, it will waste a lot of space, and the efficiency will be very low because of a large number of meaningless operations such as adding and subtracting 0 elements. MATLAB provides a sparse storage method, which is sparse.

Sparse functions are usually used directly to create sparse matrices, such as

s? =? Sparse (1:n, 1:n,1); An n×n unit array will be created, and

b? =? Sparse (10000, 10000, PI) will create a matrix of 10000x 10000, which only has the value of pi in the lower right corner, and all other elements are zero.

Sparse storage and conventional storage of matrices can be transformed into each other through sparse function and full function. For example, the previous example of creating an n-order identity matrix can also be realized in the following ways:

s? =? Sparse (eye(n, n));); But the latter method needs to create a temporary cell array for routine storage, which may cause a lot of space consumption and even lead to insufficient memory. For the sparse matrix b created earlier, do not try to use it.

Full(B) Convert it to normal storage mode, because it requires 800M of memory.

An example of sparse matrix application uses a question I answered not long ago. Interested parties can refer to:

/question/572466904.html? oldq= 1

For the general concept of sparse matrix, please refer to.

http://en.wikipedia.org/wiki/Sparse_matrix

For more information about sparse matrix in MATLAB, please refer to the relevant chapters in the documentation (there is a special sparse matrix in the user manual).

I hope it will help the landlord. If you have any questions, please ask.