1% r = CheckMRAPRepresentation(H, prec)
3% Checks
if the input matrixes define a continuous time MRAP.
5% All matrices H0...HK must have the same size, the dominant
6% eigenvalue of H0
is negative and real, and the rowsum of
7% H0+H1+...+HK
is 0 (up to the numerical precision).
11% H : list/cell of matrices, length(K)
12% The H0...HK matrices of the MRAP to check
17% The result of the check
19function r = CheckMRAPRepresentation(H,prec)
21 global BuToolsCheckPrecision;
22 if isempty(BuToolsCheckPrecision)
23 BuToolsCheckPrecision = 1e-12;
26 if ~exist(
'prec',
'var')
27 prec = BuToolsCheckPrecision;
30 r = CheckRAPRepresentation(H{1},SumMatrixList(H(2:end)),prec);