inttype, iconvert, uint8, uint16, etc... do not mention that [] is always a double
Reported by Vincent Belaïche
BUG DESCRIPTION:
----------------
Documentation fails to tell that empty matrix are always of double type.
case 1:
a = uint16([1 2 3]);
disp(inttype(a));
a(1:3) = [];
disp(inttype(a));
a(1) = uint16(4);
disp(inttype(a));
-> 12
-> 0
-> 12
case 2:
b = uint16([1 2 3]);
b($+1) = 4;
inttype(b)
-> 12
case 3:
c = uint16([]);
b($+1) = 4;
inttype(b)
-> 0
I am not saying that this behavior is bad, but it should be documented, especially there is a difference of behavior between case 2 and case 3.
There is an info node
Aide de Scilab >> Fonctions Elémentaires > Matrice - génération > empty ([])
and it does not have any "see also" link to these integer conversion issues...