I was user of MATLAB from some years. Then, I realized that almost everything that I used in MATLAB can be possible in Python but free and in many ways easier. Extend my code with parallel programming, inter-process communication, creation of a web-server, use of databases etc... is trivial in Python and a pain in Matlab. Now python is maybe the most popular programming language for science, some example:
Thank you for sharing a very comprehensive information. Am glad to know that Python is now the most popular introductory teaching language at top U.S. Universities. Thank you once more.
Python is future of programming. I simply suggest you to do the same programming in matlab and python and just see the difference, Python is super fast.
It's more of a fun link. Personally I either go to matlab for prototyping and then prog languages for coding things up. Python is like a cult: Users don't accept anything against it
MATLAB and Python are two different programming levels that, given that your goal is to be very important, Python is less involved with RAM, and faster, but graphic and language applications have a higher level.
I think this answer of Gabriel covers alot "We should not to lose sight of Matlab is a software to scientists and engineers and Python is a general-purpose language".
@Abdelaziz you become very deterministic. I can find the same rational but for matlab applications. Maybe you are talking about those who use matlab as a black box. Besides some optimisation and fft all else I write myseld. I can write in matlab what you write in 10 lines only in 3 (an example as an exaggeration - implying that what counts here is ones purpose). Let me explain: Vol surface calibration and interpolation. In matlab - I will write most things my self, then use say the optim package (lsqnonlin) to get results (which by the way I fully trust). Likewise in Python, I will write most things my self then I will (i) have to look the best package available for optimisation, (ii) read the structure, and (iii) then implement. And at the end - python standard optim toolkit is extremely bad when compared to matlab (a simple demonstration can do - yeah I can surely use a vendor package but also add another 1h for boost installation etc). So it all depends on what you use and what you have access to. Also most importantly on what you want to build knowledge on.
So to this end, depending on the application I will always use Matlab for any type of prototyping - for me its faster, for others not.
What I dont like in languages other than matlab - is because matlab is older (1984 vs 1989) - it seems to me that every other scripiting language (inc R) wanted to differentiate from matlab.
Python: No nesting for loops - simple mistakes not forgiven - WHY????
R: Avoided to use A(:,1) and uses instead the non-intuitive A(,1)
Python: a'a.conj().transpose() instead of a' - LoL
So all these are criteria what people have got used to using. So prefer to write matrices like a = [ 4 3 2 ; 2 8 6 ; 1 4 7 ] and prefer a = array([[4,3,2],[2,8,6],[1,4,7]]) .
This takes time for me cause I have been taught on an easier way.
So I use Matlab for all prototypes, C# for more "programming" things, Python where necessary, and R when I want to use some econometric/ statistic toolboxes (that I use like a black box - lol).
I think overall Python will win in most areas against Matlab as well as in scientific computing fields.Python combines simplicity and efficiency in a very fashionable way which also have a great support of a much larger community compared to Matlab community (you can check github projects). In my opinion, if you want to learn a promising and a futuristic programming language go for Python.
Python is a future of research. For example, a lot of frameworks available for deep learning to handle classification problems and much more scientific libraries are available, numpy, scipy, matplotlib etc. Also a super fast language. Matlab much involved with RAM and it makes the program slower. So python is the best option.
Thank you so much for your contribution Mr Mubashir Ahmad. Glad to know that Matlab is more involved with RAM which makes a program slower while Python is considered a better prog. option.
@ Dr. Gabriel Ruiz Martínez. Thank you once more for your contribution. The link (https://stackoverflow.com/questions/5214369/python-vs-matlab) is very useful. Tnks.
I see myself jump from one to the other depending on the project at hand:
Ease: Matlab wins as you don't have to import which are important in Python, because you can hardly accomplish any worthy task without having to install modules and libraries. Again you can achieve a mouth watering graphical output with less stress though you can achieve same in Python by combining libraries Numpy, Matplotlib,... you just have to show your creativity.
Cost: Python wins as it's free for life and most of the modules are readily available on Github, unlike MATLAB that requires license.
Speed: Python wins, though you can make your MATLAB functions run faster by precompiling them.
Versatility: Python all the way, I have used it to build a range of unrelated applications with little stress... even mobile apps, which remains a nightmare with MATLAB.
If you want to learn, I suggest you learn PYTHON first, because learning MATLAB first may make you reluctant to learning Python and other open source programming languages as they may look hard due to the ease of MATLAB.
V good answer from Ewetoye Ibrahim: " If you want to learn, I suggest you learn PYTHON first, because learning MATLAB first may make you reluctant to learning Python and other open source programming languages as they may look hard due to the ease of MATLAB. "
Very well said! It drives me crazy how Python and R differentiates things just for the sake of differentiating and no other reason.
Modestus Okwu here are some results from Nasa testing
For me, it depends on the application that I want to develop. I prefer both Python and Matlab. Both have its own advantages and disadvantages. I think it depends on the type of work we need to accomplish.
The learning curve of MATLAB is faster than Python, the available tools and developers community is older and bigger (for research purposes at least). But Python is the future as it was mentioned in the previous answers and it gives you more flexibility and involvement in the details.
Interesting to see how many people find MATLAB easier than Python, to me it's the opposite - installation was a pain, the interface looks horrible and nothing seems intuitive to me. With Python, you just learn your basics and you're off the ground, it's free and easy to install any add-ons, I enjoy working in terminal, and the community aspect is brilliant. I will use MATLAB if it turns out that its signal processing toolbox is superior, but only then.
Hi, just to amend my answer - from a quick play in MATLAB it does seem like its graph-generating functions are better than matplotlib and spy in Python - MATLAB generates very sharp images, seemingly with less computational expense. I stand by what I said about its interface though! I'm looking into controlling MATLAB from terminal with Python, apparently you can do this with Transplant - https://github.com/bastibe/transplant
- You need to be specific which IDE you use. For the moment R-Studio and Spyder use the format of Matlabs IDE. You comparing using Terminal against what?
- Matlab (not sure whether in Python Signal processing is more flexible because of the community approach) - but what you need to understand is robustness. What Matlab says it does - it does exactly. There are no errors in items that are in production.
- Installation I am not sure what you refer to: Click *.exe and choose your packages. In Python the "hard" thing is to decide which package to use for what as there is a plethora of packages that do the "same" thing.
Lastly, as I Matlab advocate the best answers I found are:
(i) Depending on the task
(ii) Starting with Matlab spoils you (because of its coherence) and makes it hard to make the transition to any other language. This is what I noticed from my experience.
Now statements like Python is future of programming etc are just proliferation of personal views. Maybe Julia replaces everything in 5 years, maybe another new language comes out. The thing is to know what you need to do and what is available at hand. The main problem that I see with all (scripting) languages is the lack of transferability. If I move from R to Matlab to Python I need to change my logic and the way I use lists, matrices, arrays, basic commands, assignments etc. Now for those who compare Matlab/Python with C/C++ is a non-comment. One is a (lower level) language (even 2 years of C++ does not qualify one as an expert) whereas the others are scripting languages - you can pick up and have something running quite fast.
I was talking about the generic MATLAB IDE being not very picturesque. This might seem superficial, but if I'm going to spend hours a day working in an environment, I'd prefer it to be easy on the eyes.
The installation difficulty I mentioned was just the initial installation in Ubuntu - to get it working I had to find an answer on a forum, the official documented instructions didn't work for me. This whole process was really time-consuming.
Now that I've gotten started with MATLAB I can see, as I described in my last comment, that it is probably the correct tool for the types of visualisations I'm trying to achieve at the moment, hence I added to my first comment. The first comment was really about MATLAB's accessibility vs Python, I'm not denying that its core functionality is probably much better at the moment.
Nice. Yes Ubuntu would possibly be less straight fwd than windows. I understand. I don't think we can classify as better rather distinguish where the added value of open source against paid comes into play. Let's see what others say as well.
I used to hate python. Now I like it vvv much. Now I hate R - lol
Matlab and Python are both great tools, and there's no reason you can't use both for research (I code in both daily). If doing research is your only goal, it probably makes sense to use what others are using in your field (for example, see github for projects related to yours). The more experience you have with programming the more powerful (object oriented) Python becomes. Coming from Matlab, you will probably find Python's plotting a bit cumbersome, as most people do, but you get used to it. It's numerical libraries (e.g. numpy) closely resemble Matlab. Over time, your productivity with a language like Python will likely surpass that of Matlab, if you are using it to its full potential. I also find it much easier to write modularized, reusable, and maintainable code. For IDEs, I highly recommend PyCharm, it's a professional grade IDE (it blows Matlab's IDE out of the water).