Matlab has no means to analyze big O complexity of an algorithm.
Nevertheless, you could get experimental results for different values of "n" using the profiler or measuring time with "tic" and "toc", and in this way observe the trend when "n" grows. (In you mesure time, take into account that the first run takes more time.)
Regards