1function Q_DT_MMAPK_ParsePara(D0,D0_name,D,D_name)
2%Q_DT_MMAPK_ParsePara checks the validity of the input matrices D0, D as a
3%representation of a Discrete-Time
MMAP[K]. D{i} holds the mxm matrix D_i.
7 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
8 '%s has to be numeric', D0_name);
13 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
14 '%s_%d has to be numeric',D_name, i);
20 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
21 '%s has to be a real matrix', D0_name);
25 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
26 '%s_%d has to be a real matrix',D_name,i);
31if (size(D0,1) ~= size(D0,2))
32 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
33 '%s is not a square matrix', D0_name);
36 if (size(D{i},1) ~= size(D{i},2))
37 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
38 '%s_%d is not a square matrices',D_name,i);
42if (size(D0,1) ~= size(D{1},1))
43 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
44 'The matrices %s and %s_1 do not have the same dimension', D0_name, D_name);
47 if (size(D{i},1) ~= size(D{i+1},1))
48 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
49 'The matrices %s_%d and %s_d do not have the same dimension',D_name,i,D_name,i+1);
54if (min(min(D0)) < -10^(-14))
55 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
56 'The matrix %s contains negative data', D0_name);
59 if (min(min(D{i})) < -10^(-14))
60 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
61 'The matrix %s_%d contains negative data',D_name,i);
65% check (sub)stochasticity
66if (max(sum(D0,2)) > 1+10^(-14))
67 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
68 'The matrix %s has to be substochastic', D0_name);
74if (max(sum(Dsum,2)) > 1+10^(-14))||(min(sum(Dsum,2)) < 1-10^(-14))
75 error(
'MATLAB:Q_DT_MMAPK_ParsePara:InvalidInput',...
76 'The matrix %s+%s_1+...+%s_K has to be stochastic', D0_name,D_name,D_name);