max-plus algebra A λ +
[ap , lam] = maxplusaplus(A)
The function returns
ap = Aλ⊕Aλ2⊕Aλ3⊕⋯⊕Aλn ,
where Aλ = A-λ , with λ is an eigenvalue of A , and an error if matrix A does not has a unique eigenvalue.
e=-%inf; a=[1 2 e;4 e 3;e 5 e] a = 1. 2. -Inf 4. -Inf 3. -Inf 5. -Inf [ap,lam]=maxplusaplus(a) lam = 4. ap = - 2. - 2. - 3. 0. 0. - 1. 1. 1. 0.