MATLAB: Determining the optimal number of clusters in Kmeans technique

clustering

I have a matrix like "A". I want to cluster its data using K-Means method.
A=[45 58 59
46 76 53
57 65 71
40 55 59
25 35 42
34 51 74
46 90 53
46 63 60
33 50 78
53 57 60
31 28 72
49 49 53
76 88 82
34 100 198
35 35 35];
I used the following command to cluster data.
[Data_clustred, c]= kmeans(A,num_cluster);
by the way, knowing the optimal number of cluster is neccessary to me.
Is there any criteria that determines the optimal numbers of clusters? if so, How can I write its programm.
any help whould be appreciated. Thanks in advance.