~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to macros/percent/%sp_s_s.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function s=%sp_s_s(a,b)
 
2
// %sp_s_s - substract a scalar b to a sparse matrix a
 
3
//!
 
4
// Copyright INRIA
 
5
if size(b)==[-1 -1] then
 
6
  [m,n]=size(a)
 
7
  s=a-(b+0)*speye(m,n)
 
8
else
 
9
  s=full(a)-b
 
10
end