BUG DESCRIPTION:
----------------
Unlike for an input vector or matrix, and unlike as documented,
flipdim(h,1,2) with any hypermatrix h reverts the order of lines in blocks:
--> flipdim(1:10,2,2) // OK
ans =
9. 10. 7. 8. 5. 6. 3. 4. 1. 2.
--> m = ndgrid(1:4)
m =
1. 1. 1. 1.
2. 2. 2. 2.
3. 3. 3. 3.
4. 4. 4. 4.
--> flipdim(m,1,2) // OK
ans =
3. 3. 3. 3.
4. 4. 4. 4.
1. 1. 1. 1.
2. 2. 2. 2.
BUT
--> h = cat(3,m,m)
h =
(:,:,1)
1. 1. 1. 1.
2. 2. 2. 2.
3. 3. 3. 3.
4. 4. 4. 4.
(:,:,2)
1. 1. 1. 1.
2. 2. 2. 2.
3. 3. 3. 3.
4. 4. 4. 4.
--> flipdim(h,1,2) // KO
ans =
(:,:,1)
4. 4. 4. 4. <<<< should be [3 3 3 3]
3. 3. 3. 3. <<<< [4 4 4 4]
2. 2. 2. 2. <<<< [1 1 1 1]
1. 1. 1. 1. <<<< [2 2 2 2]
(:,:,2)
4. 4. 4. 4.
3. 3. 3. 3.
2. 2. 2. 2.
1. 1. 1. 1.
ERROR LOG:
----------
None. Wrong answer
HOW TO REPRODUCE THE BUG:
-------------------------
m = ndgrid(1:4);
h = cat(3,m,m);
flipdim(h,1,2)
OTHER INFORMATION:
------------------
Occurs as well in Scilab 6.0.2