Build matrix file for trajectories entries

Hi,

my data are trajectories with points (x,y) (2D). I have several trajectories, each one with different points in different time gaps. I want to generate a matrix file (sparse or dense) to be used with scluster command line. I already read the manual, but all the examples I saw it seems that the matrix just accept one dimensional entries ... I have two features (x,y) for each entry (point) of each object (trajectory). The question is: how I build this matrix file?

Thanks in advance for your help.