soundsec(..) has trivial equivalences, is useless and should be removed. Simply use 0 : 1/freq : t*(1-%eps)
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
soundsec(..) has a trivial equivalence, is useless and should be removed. Simply use 0:1/freq:t instead
--> soundsec(2e-4)
ans =
0. 0.0000454 0.0000907 0.0001361 0.0001814
--> 0 : 1/22050 : 2e-4*(1-%eps)
ans =
0. 0.0000454 0.0000907 0.0001361 0.0001814
--> soundsec(1, 10)
ans =
0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
--> 0 : 1/10 : 1*(1-%eps)
ans =
0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
But contrarily to soundsec(), the colon allows to directly choose the initial date:
--> 0.3 : 1/10 : 1*(1-%eps)
ans =
0.3 0.4 0.5 0.6 0.7 0.8 0.9
... or/and to include the upper time bound when required:
--> 0.3 : 1/10 : 1
ans =
0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.
OTHER INFORMATION:
------------------
* The colon and analyze pages could be improved to show (and display) such trivial examples.
* If a user really needs such a functional equivalence, he/she can rewrite it in 3 lines.
IMHO, we don't need such a fake function as a native one in Scilab.
Even as an educational function, it is too trivial.