1function QBD_RAP_ParsePara(A0,A1,A2)
2%QBD_RAP_ParsePara checks the validity of the input matrices A0, A1 and A2
3%
for a QBD with RAP components. The evaluated conditions are necessary but not
8 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
9 'A0 has to be numeric');
12 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
13 'A1 has to be numeric');
16 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
17 'A2 has to be numeric');
22 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
23 'A0 has to be a real matrix');
26 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
27 'A1 has to be a real matrix');
30 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
31 'A2 has to be a real matrix');
35if (size(A0,1) ~= size(A0,2))
36 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
37 'A0 is not a square matrix');
39if (size(A1,1) ~= size(A1,2))
40 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
41 'A1 is not a square matrix');
43if (size(A2,1) ~= size(A2,2))
44 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
45 'A2 is not a square matrix');
47if (size(A0,1) ~= size(A1,1))
48 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
49 'The matrices A0 and A1 do not have the same dimension');
51if (size(A0,1) ~= size(A2,1))
52 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
53 'The matrices A0 and A2 do not have the same dimension');
57if (max(sum(A0+A1+A2,2)) > 10^(-14)) || (min(sum(A0+A1+A2,2)) < -10^(-14))
58 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
59 'The matrix A0+A1+A2 must have zero row sum');
62%check dominant eigenvalue
63if (max(real(eig(A1))) > -10^(-14))
64 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
65 'The dominant eigenvalue of the matrix A1 must have negative real part');
67if (max(real(eig(A0+A1+A2))) > 10^(-14)) || (max(real(eig(A0+A1+A2))) < -10^(-14))
68 error(
'MATLAB:QBD_RAP_ParsePara:InvalidInput',...
69 'The dominant eigenvalue of the matrix A0+A1+A2 must have zero real part');