# Assume M is an already constructed state space matrix of a time series
M <- matrix(rnorm(100), nrow = 10)
distanceMat <- distanceMatrix(M, "euclidean")
print(distanceMat) # Optionally convert to a full matrix for display
Run the code above in your browser using DataLab