<< gmres Sparses Matrix ludel >>

Scilab help >> Sparses Matrix > issparse

issparse

入力値が疎行列かどうかを調べる

呼び出し手順

res = issparse(S)

引数

S

scilabオブジェクト

res

1: 行列は疎行列, 0: その他

説明

res = issparse(S) は、S が疎行列の時に1, それ以外の時に0を返します.

例

sp = sparse([1,2;4,5;3,10],[1,2,3]);
if issparse(sp) == 1 then
  disp("It is a sparse");
end

A = 1;
if issparse(A) == 0 then
  disp("It is not a sparse");
end

参照

<< gmres Sparses Matrix ludel >>