How to cluster time series data



Is there a way to apply kmeans-function to time series data?
Data is represented by a matrix of n rows and m columns
where columns corresponds to different time series and rows
to measurements. By default kmeans-function assumes that
the rows corresponds to data points to be clustered but in
this case it should calculate and evaluate the distances
between time series (columns) as whole. So instead of
calculating the distance between two rows it should
calculate the distances between the time series and build
the clusters according to that. Euclidean distance between
two time series in this matrix can be calculated with:
"sqrt(sum((( matrix(:,i) ) - ( matrix(:,j) )).^2))" but how
to exploit this with kmeans-clustering?
.



Relevant Pages