X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Felementary_functions%2Fmacros%2F%25s_y_s.sci;h=ccbd0f626dfcd7dd6afbb5022ffbe5bcb7a39824;hp=9ca530e26ebe4adeca8f0e83593062d7030cbb79;hb=d262c689731e4d49b28968206f21a60ba9d8022d;hpb=c1541bd71bdc8643c716727f28ad22c78ebb8376 diff --git a/scilab/modules/elementary_functions/macros/%s_y_s.sci b/scilab/modules/elementary_functions/macros/%s_y_s.sci index 9ca530e..ccbd0f6 100644 --- a/scilab/modules/elementary_functions/macros/%s_y_s.sci +++ b/scilab/modules/elementary_functions/macros/%s_y_s.sci @@ -36,7 +36,11 @@ function x = %s_y_s(b, a) b = matrix(b(k), prod(sx), prod(sa)) // Least square Processing - x = b / a(:).' + if issparse(a) then // call by %sp_y_sp + x = (a(:) \ b.').' + else + x = b / a(:).' + end // Reshaping the raw result x = matrix(x, sx)