An algorithm for the computation of the transfer function matrix of generalized two-dimensional systems