1function QBD_ParsePara(A0,A1,A2)
2%QBD_ParsePara checks the validity of the input matrices A0, A1 and A2
6 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
7 'A0 has to be numeric');
10 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
11 'A1 has to be numeric');
14 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
15 'A2 has to be numeric');
20 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
21 'A0 has to be a real matrix');
24 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
25 'A1 has to be a real matrix');
28 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
29 'A2 has to be a real matrix');
33if (size(A0,1) ~= size(A0,2))
34 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
35 'A0 is not a square matrix');
37if (size(A1,1) ~= size(A1,2))
38 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
39 'A1 is not a square matrix');
41if (size(A2,1) ~= size(A2,2))
42 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
43 'A2 is not a square matrix');
45if (size(A0,1) ~= size(A1,1))
46 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
47 'The matrices A0 and A1 do not have the same dimension');
49if (size(A0,1) ~= size(A2,1))
50 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
51 'The matrices A0 and A2 do not have the same dimension');
55if (min(min(A0)) < -10^(-14))
56 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
57 'The matrix A0 contains negative data');
59if (min(min(A1)) < -10^(-14))
60 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
61 'The matrix A1 contains negative data');
63if (min(min(A2)) < -10^(-14))
64 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
65 'The matrix A2 contains negative data');
68% check (sub)stochasticity
69if (max(sum(A0+A1+A2,2)) > 1+10^(-14))
70 error(
'MATLAB:QBD_ParsePara:InvalidInput',...
71 'The matrix A0+A1+A2 has to be (sub)stochastic');