3% Computes the stationary solution of a discrete time
8%
P : matrix, shape (M,M)
9% The transition probability matrix of the Markov
14% pi : row vector, shape (1,M)
15% The vector that satisfies `\pi\,
P = \pi, \sum_i \pi_i=1`
19% The procedure raises an exception if :code:`butools.checkInput`
20%
is set to :code:`
true` and :func:`CheckProbMatrix` (
P) fails.
22function pi = DTMCSolve (
P)
24 global BuToolsCheckInput;
25 if isempty(BuToolsCheckInput)
26 BuToolsCheckInput =
true;
29 if BuToolsCheckInput && ~CheckProbMatrix(
P,
false)
30 error('DTMCSolve: The given matrix
is not a valid transient probability matrix. If you are sure you want this use DRPSolve instead of DTMCSolve.');