Bug 73756

Summary: Other: mmult with transpose arg drops last row
Product: LibreOffice Reporter: Larry <cppljevans>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: miguelangelrv
Priority: medium    
Version: 4.1.2.3 release   
Hardware: Other   
OS: Linux (All)   
Whiteboard: BSA
Crash report or crash signature: Regression By:
Attachments: .ods demonstrating bug.

Description Larry 2014-01-18 02:21:33 UTC
Created attachment 92313 [details]
.ods demonstrating bug.

Problem description: 

I've a spreadsheet with 2 3x2 matridces side by side (A1:D3).
I want to mmult(A1:B3;transpose(C1:D3)); however,
the result has the last row truncated.  IOW, the
resulting matrix is 2x3 instead of 3x3.

Steps to reproduce:

Here's the printout of formulas in csv notation:

1,4,7,10
2,5,8,11
3,6,9,12
,,,
{=3DTRANSPOSE(C1:D3)},{=3DTRANSPOSE(C1:D3)},{=3DTRANSPOSE(C1:D3)},
{=3DTRANSPOSE(C1:D3)},{=3DTRANSPOSE(C1:D3)},{=3DTRANSPOSE(C1:D3)},
,,,
"{=3DMMULT(A1:B3,A5:C6)}","{=3DMMULT(A1:B3,A5:C6)}","{=3DMMULT(A1:B3,A5:C6)=
}",
"{=3DMMULT(A1:B3,A5:C6)}","{=3DMMULT(A1:B3,A5:C6)}","{=3DMMULT(A1:B3,A5:C6)=
}",
"{=3DMMULT(A1:B3,A5:C6)}","{=3DMMULT(A1:B3,A5:C6)}","{=3DMMULT(A1:B3,A5:C6)=
}",
,,,
"{=3DMMULT(A1:B3,TRANSPOSE(C1:D3))}","{=3DMMULT(A1:B3,TRANSPOSE(C1:D3))}","=
{=3DMMULT(A1:B3,TRANSPOSE(C1:D3))}",
"{=3DMMULT(A1:B3,TRANSPOSE(C1:D3))}","{=3DMMULT(A1:B3,TRANSPOSE(C1:D3))}","=
{=3DMMULT(A1:B3,TRANSPOSE(C1:D3))}",

IOW, when the array formula:

 MMULT(A1:B3,TRANSPOSE(C1:D3))

is put in A12, the result is a 2 row by 3 column
matrix.

Current behavior:

The result is a 2 row by 3 column matrix in A12:C13

Expected behavior:

The result should be a 3 row by 3 column matrix
the same as that in A8:C10

BTW, this was reported at:

http://listarchives.libreoffice.org/global/users/msg36097.html

but that post received no response; hence, I assume
no body has experienced it and it is an actual bug
instead of me doing something stupid.

-regards,
Larry

             
Operating System: Ubuntu
Version: 4.1.2.3 release
Comment 1 m_a_riosv 2014-01-18 03:22:37 UTC
Hi Larry, thanks for reporting.

I don't know how but seems only a change in the array range.

Please try:
Go to A12
Ctrl+/
[F2]
Select and copy the formula
Esc
Del
Right arrow + Left arrow (for broke the range selection)
[F2]
Paste the formula
Ctrl+Shift+Enter.

Seems right for me.
Comment 2 Larry Evans 2014-01-18 16:20:27 UTC
(In reply to comment #1)
> Hi Larry, thanks for reporting.
> 
> I don't know how but seems only a change in the array range.
> 
> Please try:
> Go to A12
> Ctrl+/
> [F2]
> Select and copy the formula
> Esc
> Del
> Right arrow + Left arrow (for broke the range selection)
> [F2]
> Paste the formula
> Ctrl+Shift+Enter.
> 
> Seems right for me.

Thanks Mariosv,

I tried it as you described, and it worked.

What I don't understand is why, when I entered that formula
with the function wizard, it didn't work.
Comment 3 Larry Evans 2014-01-18 17:12:47 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Hi Larry, thanks for reporting.
> > 
> > I don't know how but seems only a change in the array range.
> > 
> > Please try:
> > Go to A12
> > Ctrl+/
> > [F2]
> > Select and copy the formula
> > Esc
> > Del
> > Right arrow + Left arrow (for broke the range selection)
> > [F2]
> > Paste the formula
> > Ctrl+Shift+Enter.
> > 
> > Seems right for me.
> 
> Thanks Mariosv,
> 
> I tried it as you described, and it worked.
> 
> What I don't understand is why, when I entered that formula
> with the function wizard, it didn't work.

If I remember correctly, when, in the function wizard,
I entered the transpose function call as the 2nd
argument to the mmult call, I did *not* use the
function wizard.  Instead I just entered the
characters:

  transpoze(C1:D3)

However, when, in the function wizard, I selected
the little fx icon , and then used the wizard
to enter the transpose call, the results were OK.
Comment 4 m_a_riosv 2014-01-18 17:54:41 UTC
If you have selected a range when enter the array formula, this range is used for the array.

In any case I think we can change the status to RESOLVED NOTABUG, please if you are not agree reopen it.