<< maxpluspwr Max-Plus Algebra maxplusscg >>

Max-Plus Algebra >> Max-Plus Algebra > maxpluspwrbig

maxpluspwrbig

Max-plus algebra the big power of A (i.e. A⊗m, 2p = m ≥ n)

Calling Sequence

[Z] = maxpluspwrbig(A,n)

Parameters

A
: square input matrix
n
: nonnegative integer
Z
: output matrix Z = A ⊗m , where m = 2^ceil(log2(n)).

Description

This function returns Z = A⊗m, where m =2p with p is the smallest integer that satisfy 2p = m ≥ n. And n is not exceed 10300.

Examples

A = sprand(5,5,0.7);
k = find(A == 0);
A(k) = -%inf;
A = round(10*A);
A = full(A)
A  =

   2.  -Inf    8.    2.    9.
   6.  -Inf  -Inf    8.    8.
   8.  -Inf    6.    1.    5.
   0.    2.    5.    3.    10.
   7.    4.  -Inf  -Inf    6.      

Z = maxpluspwrbig(A,10^100)
Z  =

  1.0+101 *

   1.3998405    1.3998405    1.3998405    1.3998405    1.3998405
   1.3998405    1.3998405    1.3998405    1.3998405    1.3998405
   1.3998405    1.3998405    1.3998405    1.3998405    1.3998405
   1.3998405    1.3998405    1.3998405    1.3998405    1.3998405
   1.3998405    1.3998405    1.3998405    1.3998405    1.3998405

Authors

"Max-Plus Algebra Toolbox", ver. 1.01, April, 2009.

See Also


<< maxpluspwr Max-Plus Algebra maxplusscg >>