Suppose i have matrix the first and second column represent x,y-coordinates and third column is cluster id : 
   95.0129    5.7891    3.0000
   23.1139   35.2868    1.0000
   60.6843   81.3166    2.0000
   48.5982    0.9861    3.0000
   89.1299   13.8891    3.0000
   76.2097   20.2765    3.0000
   45.6468   19.8722    3.0000
    1.8504   60.3792    1.0000
   82.1407   27.2188    3.0000
   44.4703   19.8814    3.0000
   61.5432    1.5274    3.0000
   79.1937   74.6786    2.0000
   92.1813   44.5096    2.0000
   73.8207   93.1815    2.0000
   17.6266   46.5994    1.0000
   40.5706   41.8649    1.0000
   93.5470   84.6221    2.0000
   91.6904   52.5152    2.0000
   41.0270   20.2647    3.0000
   89.3650   67.2137    2.0000

I want create the matrix of individual cluster id with its x,y coordinates using matlab, for example cluster 1; c(1)= [23.1139   35.2868 ;17.6266   46.5994;40.5706   41.8649]