1%{ @file dtmc_isfeasible.m
2 % @brief Checks feasibility of a stochastic matrix
4 % @author LINE Development Team
8 % @brief Checks feasibility of a stochastic matrix
11 % Verifies
if row sums are close to 1 and elements are non-negative.
15 % res = dtmc_isfeasible(
P)
20 % <tr><th>Name<th>Description
21 % <tr><td>
P<td>Matrix to check
26 % <tr><th>Name<th>Description
27 % <tr><td>res<td>Precision level (1-15) if feasible, or 0 if not feasible
30function res=dtmc_isfeasible(
P)
34 if min(sP) > 1-10^-tol && max(sP) < 1+10^-tol && min(
P(:)) > -10^-tol