This paper introduces a new method for calculating distances between matrix sequences of different length. Matrix sequences are often used in spatiotemporal analysis, a field of research combining topological frameworks and temporal reasoning. The Qualitative Trajectory Calculus, a spatiotemporal calculus using matrix sequences, is used as an example in this paper. Since current approaches for comparing sequences are not suitable to calculate distances between matrix sequences of different length, a new method is proposed. The method is based on sequence alignment and uses the Levenshtein distance metric as starting point. The method is presented in general at first, followed by an application to QTC-matrix sequences and a three cushion billiards movement pattern detection example. Possible applications in expert and intelligent systems are discussed, such as human-robot interaction with multiple robots, and automated traffic analysis of (autonomous) vehicle interactions. The proposed method, however, can be applied in a broad range of domains, whenever distances need to be calculated between matrix sequences of different length. (C) 2018 Elsevier Ltd. All rights reserved.