Exponentiation on rectangular matrices does not work as described
Reported by Federico Miyara
BUG DESCRIPTION:
----------------
The documentation for the hat ^ (exponentiation or, rather, power) operator says:
"If A is a vector or a rectangular matrix the exponentiation is done element-wise, with the usual meaning."
However, when attempting this with a non-vector matrix it reports an error. It works fine for vectors, either row or column.
ERROR LOG:
----------
at line 20 of function %s_pow ( C:\Program Files\scilab-6.0.1\modules\ast\macros\%s_pow.sci line 32 )
at line 3 of function %s_p_s ( C:\Program Files\scilab-6.0.1\modules\ast\macros\%s_p_s.sci line 15 )
%s_pow: Wrong size for input argument #1: Square matrix expected.
HOW TO REPRODUCE THE BUG:
-------------------------
a = [1 2 3; 4 5 6];
b = a^2
OTHER INFORMATION:
------------------
For consistency it is suggested that ^ be defined only for square matrices and scalars, reserving .^ for all cases of element-wise exponentiation.
If this were not possible or advisable, the documentation should at least reflect the true behavior