Navigation

Operators and Keywords

Function List:

C++ API

sprandsym.m File Reference


Functions

 elseif (nargin==2) m1
 if (isempty(i1)&&isempty(i2)) S
 sparse (i2, j2+1, randn(k2, 1), n2, n2)
 triu (S1, 1)']
endif else print_usage ()

Variables

function S
 n1 = m1 + rem (n, 2)
 mn1 = m1*n1
 k1 = round (d*mn1)
 idx1 = unique (fix (rand (min (k1*1.01, k1+10), 1) * mn1)) + 1
 j1 = floor ((idx1(1:k1)-1)/m1)
 i1 = idx1(1:k1) - j1*m1
 n2 = ceil (n/2)
 nn2 = n2*n2
 k2 = round (d*nn2)
 idx2 = unique (fix (rand (min (k2*1.01, k1+10), 1) * nn2)) + 1
 j2 = floor ((idx2(1:k2)-1)/n2)
 i2 = idx2(1:k2) - j2*n2
else S1 = sparse (i1, j1+1, randn (k1, 1), m1, n1)

Function Documentation

elseif ( nargin  = =2  ) 

if ( isempty(i1)&&isempty(i2  ) 

endif else print_usage (  ) 

sparse ( i2  ,
j2 1,
randn(k2, 1)  ,
n2  ,
n2   
)

triu ( S1  ,
 
)


Variable Documentation

i1 = idx1(1:k1) - j1*m1

i2 = idx2(1:k2) - j2*n2

idx1 = unique (fix (rand (min (k1*1.01, k1+10), 1) * mn1)) + 1

idx2 = unique (fix (rand (min (k2*1.01, k1+10), 1) * nn2)) + 1

j1 = floor ((idx1(1:k1)-1)/m1)

j2 = floor ((idx2(1:k2)-1)/n2)

k1 = round (d*mn1)

k2 = round (d*nn2)

mn1 = m1*n1

n1 = m1 + rem (n, 2)

n2 = ceil (n/2)

nn2 = n2*n2

S

Initial value:

 sprandsym (n, d)
  if (nargin == 1)
    [i, j, v] = find (tril (n))

else S1 = sparse (i1, j1+1, randn (k1, 1), m1, n1)