Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2026.0.0 - Français


spset

Set non-zeros entries of sparse matrix

Syntax

spset(sp, values)

Arguments

sp

real, complex sparse matrix

values

new values of non-zeros entries.

Description

spset is used to update all non-zeros entries of sparse matrix. The size of the values array must be equal to nnz(sp).

This function modifies the first input variable (sp) contents.

Examples

sp=sparse([1,2;4,5;3,10],[1,2,3])
[ij,v,mn]=spget(sp);
spset(sp, v * 10);
sp

See also

  • sparse — sparse matrix definition
  • spget — matrice creuse aléatoire

History

VersionDescription
2026.0.0 spset introduction.
Report an issue
<< spget Sparse Matrix Conversion chfact >>

Copyright (c) 2022-2025 (Dassault Systèmes S.E.)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 16 09:08:42 CEST 2025