First, reshape ()
For this function, it is the refactoring matrix.
(1) Requirements: The number of matrix elements before and after reconstruction is consistent. such as 3*4 matrix can be re-constituted 2*6,2*3*2 and so on.
(2) Refactoring method: First, the matrix is converted to a vector by column, then on the basis of the vector, and according to the new matrix of the column interception composition. For example, the 3*4 matrix can re-form 2*6:
1 2 3
4 5 6
7 8 9
10 11 12
First by column: 1 4 7 10 2 5 8 11 3 6 9 12
Intercept by column of new matrix: 1 4| 7 | 2 5| 8| 3 6| 9 12
More please click here
Second, full ()
Sparse matrix Two kinds of storage methods:
A = [0, 0, 0; 0, 1, 0; 1, 0, 0]; S = Sparse (a) a = Full (S) output result:>> A = [0, 0, 0; 0, 1, 0; 1, 0, 0];Act 1:S = Sparse (A)Act 2:A = Full (s) s = (3,1) 1 (2,2) 1 A = 0 0 00 1 01 0 0
Matlab reshape (), full ()