I understand that you would like to calculate the performance of your clustering algorithm using some in-built MATLAB function.
You can use the 'silhouette' function in MATLAB for calculating the performance of your clustering algorithm.
Moreover, you can also relatively compare the performance for different cluster number for the same algorithm using the 'evalclusters' function in MATLAB.
For exploring more about the function feel free to go through the documentation of the function using the following link:
- Silhouette: https://www.mathworks.com/help/stats/silhouette.html
- Evalclusters: https://www.mathworks.com/help/stats/evalclusters.html
Please note that for using these functions you need to have the access to 'Statistics and Machine Learning Toolbox'.
Hope this will help in solving your query!