On what basis is MATLAB "inflexible" to perform ML/AI research on it?
(This question is could be considered off-topic or opinion-based, but I will answer it by providing facts that could hinder the adoption of MATLAB by AI researchers).
There are 2 main reasons why MATLAB may not be the &quot;best&quot; programming language/environment for research (in AI and other areas too)

It's closed source (i.e. it's more difficult to extend it; the most similar open-source alternative to MATLAB would be Octave)
It's owned by a company (i.e., it's proprietary, so, for you to use MATLAB, you need a license, which could be given to you by your university, which is my case, or you need to buy it, but not everyone can afford this).

In my view, these are clear obstacles for people that want to share their research and make sure that people can reproduce their results or build new ideas on top of them. However, in some cases, using proprietary software for research may be the best (or even only) option (see e.g. this for more info). In fact, I have also seen MATLAB being used for research in artificial intelligence (here is an example), but the choice of MATLAB might have been due to the familiarity of the authors with the language/environment.