1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2012 - 2016 - Scilab Enterprises
4 // Copyright (C) 2020 - Samuel GOUGEON
6 // This file is hereby licensed under the terms of the GNU GPL v2.0,
7 // pursuant to article 5.3.4 of the CeCILL v.2.1.
8 // This file was originally licensed under the terms of the CeCILL v2.1,
9 // and continues to be available under such terms.
10 // For more information, see the COPYING file which you should have received
11 // along with this program.
13 function a = %sp_r_sp(p, b)
14 // a = p / b, such that p = a * b
16 // not-square complex b not supported
21 msg = _("%s: Arguments #%d and #%d: Same numbers of columns expected.\n")
22 error(msprintf(msg, "%sp_r_sp", 1, 2))
31 b = b * b.' // Makes b square
35 if rk < min(rb,cb) then
36 warning(msprintf(_("sparse / sparse: Deficient rank: rank = %d"),rk))
40 a = [a ; sparse(lusolve(h,full(p(k,:)).').')]