The prototype of the function: R = sprand(m,n,density,rc)
I am trying to implement that missing feature in octave, but I am really getting stuck here. The fourth parameter is rc:
1) If rc is scalar, then it is the reciprocal condition number that the random sparse matrix generated should approximately has.
2) If
rc is a vector of length
lr,
where
lr <= min(m,n), then
R has
rc as
its first
lr singular values, all others are zero
Any one have information on how to tackle that problem?... seems not to be trivial. It would be something about starting from the point of a diagonal matrix with the single values that are specified in rc vector and then do random ortogonal transformations to that matrix, but changing it in a way that it becomes random and sparse with a concrete density.