squeeze 函数
给的例子是:
rand(2,1,3)
ans(:,:,1) =
0.8491
0.9340
ans(:,:,2) =
0.6787
0.7577
squeeze(rand(2,1,3))
ans =
0.4218 0.7922 0.6557
0.9157 0.9595 0.0357
feature = flipud(fliplr(squeeze(feature)));
flipud 函数 help 的结果:
help flipud
FLIPUD Flip matrix in up/down direction.
FLIPUD(X) returns X with columns preserved and rows flipped
in the up/down direction. For example,
X = 1 4 becomes 3 6
2 5 2 5
3 6 1 4
fliplr 函数的help 的结果:
FLIPLR Flip matrix in left/right direction.
FLIPLR(X) returns X with row preserved and columns flipped
in the left/right direction.
X = 1 2 3 becomes 3 2 1
4 5 6 6 5 4