<< speye Sparse Matrix Manipulation sprand >>

Scilab Help >> Sparses Matrix > Sparse Matrix Manipulation > spones

spones

疎行列

呼び出し手順

sp=spones(A)

引数

A

疎行列

sp

疎行列

説明

sp=spones(A)Aと同じ疎構造を有し その非ゼロ要素の位置に1を有する,行列を生成します.

A=sprand(10,12,0.1);
sp=spones(A)
B = A~=0
bool2s(B)

参照


Report an issue
<< speye Sparse Matrix Manipulation sprand >>