GNOME Bugzilla – Bug 361074
Array/Matrix function incompatibilty with Excel
Last modified: 2011-09-30 19:23:50 UTC
1. Let {1,2,3} be a vertical array in cells $A$2:$A$4 and {1,2,3} a horizontal array in cells $B1:$D1. Define array function {=$A2:$A4=$B$1:$D$1} in the range $B$2:$D$4 Under Excel, the result is as expected an array with "TRUE" on the diagonal and "FALSE" elsewhere. Under Gnumeric the result is an array with "TRUE" in the first row and "FALSE" elsewhere. The result in Excel is more "logical" and leads to an efficient way to generate identity matrices (just multiply by *1). 2. Let {1,2,3} be a vertical array in cells $A$2:$A$, nd {1,2,3} a horizontal array in cells $B1:$D1, and {1,0,0,0,1,0,0,0,1} the identity matrix in cells $B2:$D$4. 3. Let {=$B$2:$D$4*$A$2:$A$4} be an array function in $E$2:$G$4. Under Excel, the result is a diagonal matrix with 1,2,3 on the diagonal, under Gnumeric, the result is a matrix with 1 in the cell (1,1) and zero elsewhere. The Excel result appears more logical and useful to me. Moreover, the expression {=$B$2:$D$4*$B$1:$D$1} yields the same diagonal matrix (just by multiplying each column of the left matrix by the multiplier in the second (horizontal) array). In gnumeric, the result is again a matrix with 1 in cell (1,1) and zero elsewhere. Here one can argue that the Excel calculation is non-standard, but then again, it is very useful in practice. The Gnumeric result, on the other hand, is useless and dangerous (if one expects Excel-like behavior). Thanks for any assistance with this, Chris.
Thanks for finding this. Patch will be in 1.7.2