Matrix indexing is not coherent with MATLAB convention
Reported by Stéphane MOTTELET (@mottelet)
Matrix indexing is not coherent with Matlab (or Octave, Julia,...) conventions. For example, when x is a vector and A a matrix of indices of x, x(A) should be a matrix with the same size as A :
MATLAB:
>> x=[1 2 3]; A=[1 2;3 3]; x(A)
ans =
1 2
3 3
Julia:
julia> x=[1 2 3]; A=[1 2;3 3]; x[A]
2x2 Array{Int64,2}:
1 2
3 3
Scilab:
--> x=[1 2 3]; A=[1 2;3 3]; x(A)
ans =
1. 3. 2. 3.
This is really annoying and is a problem for portability.