1% r = CheckMMAPRepresentation(D, prec)
3% Checks
if the input matrixes define a continuous time
MMAP.
5% All matrices D0...DK must have the same size, D0 must be a
6% transient generator matrix, D1 has only non-negative
7% elements, and the rowsum of D0+D1+...+DK
is 0 (up to the
12% D : list/cell of matrices, length(K)
13% The D0...DK matrices of the
MMAP to check
18% The result of the check
20function r = CheckMMAPRepresentation(H,prec)
22 global BuToolsCheckPrecision;
23 if isempty(BuToolsCheckPrecision)
24 BuToolsCheckPrecision = 1e-12;
27 if ~exist(
'prec',
'var')
28 prec = BuToolsCheckPrecision;
31 global BuToolsVerbose;
33 if min(min(cell2mat(H(2:end)))) < -prec
35 fprintf ('CheckMMAPRepresentation: Some of the matrices H1 ... HM have a negative element!\n');
41 r = CheckMAPRepresentation(H{1},SumMatrixList(H(2:end)),prec);