After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 361074 - Array/Matrix function incompatibilty with Excel
Array/Matrix function incompatibilty with Excel
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
1.7.x
Other All
: High major
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks: 317426
 
 
Reported: 2006-10-10 07:23 UTC by Christian Ritter
Modified: 2011-09-30 19:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Ritter 2006-10-10 07:23:27 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.
Comment 1 Jody Goldberg 2006-10-16 23:49:21 UTC
Thanks for finding this.
Patch will be in 1.7.2