Update on the issue:
- Using Octave instead of Matlab eliminated this issue, however I could not proceed with Octave as it doesn't support many Matlab functions in my case.
- I tried making a batch file in which I select my environment and call my python file. After calling it through Matlab, it simply exits after reaching the import statements in Python. Of course, I did not face this issue after calling the batch file outside of Matlab (again, I need to do so via Matlab of course).
- I tried starting Matlab by double clicking on the Matlab file this time. Initially, I used to start Matlab through Anaconda prompt because otherwise, it wouldn't recognize the necessary libraries, and I suspect that this is a Path issue. However, this time, because I am using the mentioned batch file, I did not face the latter issue and the Python file was executed just fine!
Even though the problem is solved now, I would appreciate any explanation from the community regarding this issue, or an alternative solution, as this could be useful for similar cases.
Thank you.
