from State Space Convolution by Janardhanan Sivaramakrishnan
The script convolves two MIMO state space systems and gives the convoluted output

checkcompatibility(A,B,C,D,str)
function checkcompatibility(A,B,C,D,str)
if (size(A,1) ~= size(B,1)) || (size(A,1) ~= size(A,2)) || (size(C,2) ~= size(A,2))...
        || any(size(D) ~= [size(C,1) size(B,2)]) || (max([length(size(A)) length(size(B)) length(size(C)) length(size(D))]) > 2)

    error(['Dimension Mismatch in A' str ',B' str ',C' str ',D' str]);
end
if   any([~isreal(A) ~isreal(B) ~isreal(C) ~isreal(D)])
    error(['System Matrices (' 'A' str ',B' str ',C' str ',D' str ') Should be real']);
end
return

Contact us at files@mathworks.com