For a two-dimensional matrix, two dimensions are rows and columns, while the dimensions of a three-dimensional matrix are rows, columns and pages (or layers); A (::,1) means all rows and all columns on 1 page, that is, all elements on 1 page.
A is a three-dimensional matrix, a (:,1) is a two-dimensional matrix, and the third dimension is 1, Double (A (:,1)) turns this matrix into double precision.
Extended data:
Matters needing attention
In matlab, in order to ensure the accuracy, the data type of the calculated image matrix I will change from unit8 to double. ?
If we run imshow(I) directly, we will find that a white image is displayed. This is because imshow () displays images in the range of 0~ 1 for double type, that is, when it is larger than 1, it displays white, while imshow displays uint8 type in the range of 0~255.
The solution is as follows:
1、imshow(I/256); % Convert the image matrix to 0- 1?
2、imshow(I,[]); % Automatically adjust the range of displayed data?
Inshow (Unit 8 (1)); % to unit 8