complex matrix division corrected. 58/11558/1
Cedric Delamarre [Wed, 22 May 2013 10:39:51 +0000 (12:39 +0200)]
a=rand(4,4);b=rand(5,4);ac=a+%i*rand(4,4);
(b/ac)*ac
b

Change-Id: I8a1a36bb1b551aae892811bbafb432d5324633ff

scilab/modules/operations/src/c/matrix_division.c

index 6090db9..4279731 100644 (file)
@@ -477,7 +477,7 @@ int iRightDivisionOfComplexMatrix(
             {
                 cNorm  = 'N';
                 C2F(zgetrs)(&cNorm, &_iCols2, &_iRows1, (double*)poAf, &_iCols2, pIpiv, (double*)poBt, &_iCols2, &iInfo);
-                vTransposeDoubleComplexMatrix(poBt, _iCols2, _iRows2, poOut, 1);
+                vTransposeDoubleComplexMatrix(poBt, _iCols2, _iRows1, poOut, 1);
                 vGetPointerFromDoubleComplex(poOut, _iRowsOut * _iColsOut, _pdblRealOut, _pdblImgOut);
                 iExit = 1;
             }