Linearized indices fail for a matrix of rationals
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
For an array (vector, matrix, ..) of rationals, it is not possible to address components with linearized indices.
Examples:
-->r = [%s 1/%s 1/(%s+1); %s^2 2 1/%s^2]
r =
s 1 1
- - -----
1 s 1 + s
2
s 2 1
- - -
2
1 1 s
-->r(1,:) // OK
ans =
s 1 1
- - -----
1 s 1 + s
-->r(:,1) // OK
ans =
s
-
1
2
s
-
1
-->r(1) // NOK
ans =
!r num den dt !
-->r(:) // NOK
!--error 41
Incompatible output argument.
-->r($) // NOK
ans =
[]
NOTE: Arrays of rationals have NOT been built as a matrix-oriented list: they are of type 16 instead of type 17. This may be the origin of the issue.
ERROR LOG:
----------
Wrong behavior
HOW TO REPRODUCE THE BUG:
-------------------------
r = [%s 1/%s 1/(%s+1); %s^2 2 1/%s^2];
r(1) == rlist(%s,1)
r(:) == [%s, %s^2, 1/%s, 2, 1/(%s+1), 1/%s^2]'
r($) == 1/%s^2
OTHER INFORMATION:
------------------
Also in Scilab 6.0