天软金融分析.NET函数大全
>
TSL函数
>
基础函数
>
数组
>
稀疏矩阵
Spones
复制链接
简述
将稀疏矩阵S中的非零元素替换为n
定义
Spones(S:Array Of Real; n:Real): array
参数
名称
类型
说明
S
Array Of Real
稀疏矩阵
n
Real
非零元素被替换的值,实数
返回
array
数组
范例
//将S中非零元素替换为1
S:=array(0:(0:1),2:(2:3),3:(3:4));
return spones(S,1);
//结果:
相关
Sparse1
Sparse2
Speye
Sprand1
Sprand2
Sprandn1
Sprandn2
Sprandsym1
Sprandsym2
Sparsefull
Spones
Spnnz
Spnonzeros
Ifsparse
Spdiags1
Spdiags2
Spdiags3
Spdiags4