The first to use MATLAB mixed with C + + programming people, for column priority and line first some unfamiliar.
Looked at the wiki, found that: Row priority and column precedence refers to row-first storage and column-First storage.
Explanation of Wiki:
with a definition as theMthe 3x3 matrix for example:column-First Storagerefers to Matlab first save the first column of 3 elements, and then save the second column, and finally save the third column of the element, so that the 9 matrix elements in MATLAB is sorted from 1 to 9, so when the matrix element is called, M (2) refers to the second element of the first column, M (6) Refers to the second column of the third element (of course, these two elements can also be called in two-dimensional way, M (2) corresponds to M (a), M (6) corresponds to M (2,3));row-First Storageinstead, save 3 elements of the first row, and then save the elements of the second and third rows.
For example, we call the FSCANF function of Matlab to read the data in the text file into the matrix.
The data is read in the order of the text, one after the other.
Line first: The stored matrix pattern is consistent with the pattern of the text arrangement
Column precedence: The stored matrix pattern is stored in column format, one column is full, and the second column is stored.
Column first and Row first