summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug2407.sci
blob: e7bce7fd90d3a99ccda744d0498c82c78de86828 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// <-- Non-regression test for bug 2407 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=2407
//
// <-- Short Description -->
//    stdev and st_deviation are not available for hypermatrix.
//
//    When trying to calculate stdev of an hypermatrix, an error occurs 
//    systematically. The stdev of an hypermatrix should be managed by the %
//    hm_st_deviation function in Scilab.
//    After a quick look at the code of this function, i think i've 
//    understood the origin of the bug. There is a mix between two variables :
//    N and d.
//    For example, at line 8, instruction "p1=prod(dims(1:d-1));" should be 
//    replace by p1=prod(dims(1:N-1));
//    I think that the replacement of d by N in all the function could solve 
//    the problem.
//
//    Regards.

// Author : Scilab Project - Pierre MARECHAL
// Copyright INRIA
// Date : 05 mai 2007

a = zeros(3,3,3);
b = stdev(a);

if( b == 0 ) then
	affich_result(%T,2407);
else
	affich_result(%F,2407);
end