1 // ===================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2020 - Samuel GOUGEON
5 // This file is distributed under the same license as the Scilab package.
6 // ===================================================================
8 // <-- CLI SHELL MODE -->
9 // <-- NO CHECK REF -->
10 // <-- Non-regression test for bug 16365 -->
12 // <-- Bugzilla URL -->
13 // http://bugzilla.scilab.org/16365
15 // <-- Short Description -->
16 // median(m,"r") and median(m,"c") were wrong
17 // ===================================================================
30 //--> gsort(m,"r","i")
40 ref=[4 5 8 4.5 6.5 5 ];
41 assert_checkequal(median(m,"r"), ref);
43 //--> gsort(m,"c","i")
53 ref = [7 5 5.5 5 3.5 4.5 6 6.5]';
54 assert_checkequal(median(m,"c"), ref);