<< maxplusscg Max-Plus Algebra maxplusstar >>

Max-Plus Algebra >> Max-Plus Algebra > maxplussprand

maxplussprand

Max-plus algebra sparse random matrix

Calling Sequence

[A] = maxplussprand(n,m,d)

Parameters

n
: an integer number
m
: an integer number
d
: an real number between o and 1.

Description

This function returns a sparse random matrix A of size n by -m with density d.

Examples

A = maxplussprand(3,5,0.6)
A  =
 
    9.   -Inf     5.    7.     7.  
    18.    16.    8.    14.  -Inf  
    16.  -Inf   -Inf    15.  -Inf  

b = maxplussprand(8,8,0.5)
b  =
 
  -Inf   -Inf    16.    5.     3.     19.    13.    2.   
    15.  -Inf  -Inf   -Inf   -Inf   -Inf   -Inf   -Inf   
    11.  -Inf    3.     11.  -Inf     18.    18.    17.  
  -Inf     4.    19.  -Inf     16.    4.   -Inf     6.   
    2.   -Inf  -Inf   -Inf     7.   -Inf     1.   -Inf   
  -Inf   -Inf    13.  -Inf   -Inf     17.    5.   -Inf   
    19.  -Inf  -Inf     17.    5.   -Inf   -Inf     11.  
  -Inf   -Inf  -Inf     16.  -Inf   -Inf     14.  -Inf

Authors

"Max-Plus Algebra Toolbox", ver. 1.02, July, 2009.

<< maxplusscg Max-Plus Algebra maxplusstar >>