Skip to main content

Matlab vs Python. Why python is better than matlab

"Solving a problem on a computer depends on the Algorithm you choose and doesn't depend on the programming language you choose."
When I was in my first year and first semester of Engineering I have learnt 'C' programming. In the first I have toiled to understand the concept(s) on how the programming language works. I didn't even understand how for loop and while loop worked the first time I have heard Bucky Roberts C programming language tutorials on Youtube on his channel thenewboston. After few days my teacher explained me on how the for loops work and then I got to know how it works. After I have understood the basics on how the concepts behind the programming I never turned back at learning new programming language. It was easy for me to learn other programming languages. 

During my first semester when I was in the beginner stage of becoming a programmer, I wanted to started a bus booking site like redbus.in. Eventhough my idea was not unique I wanted to start a travel website. Back then I thought that we can only develop a desktop software with C language and so I contacted people on olx.in to design my website. But they quoted me a huge amount. I still remember, one company quoting me $1500 for single page. But I didn't had that much capital and so I googled on "how to design a website" and there were lots and lots of tutorials for learning on how to design a website. One of which I have learnt a lot on web designing is "w3schools.com". I have learnt HTML, CSS, Javascript one by one within a few months. This was because I got understanding of the concepts behind the programming. 

When I was in my second semester my seniors told me about python and have learnt it. It was the easiest language. After that I have learnt Matlab

Do you know why I have written all that stuff above? Because I just wanted to tell you how easy it is to learn other programming languages when you know one. If you know Matlab(just basics concepts and no need to remember any syntax) or even don't know Matlab you can learn Python easily. 

I will start off with why should I learn python?

There are many reasons, but I will state you a few. 
Even though python can do anything, python has been widely used in scientific computing, web technologies and few others. 
If you have used google.com then the next time you use google then remember that a part of it was written in python again.
Okay have you used Instagram? Then again the next time you use instagram then remember that it was written in python. Now a days Mozilla is also using python.

Lets forget about what already has been done, lets see what can be done. 
Did you know that all the above stated frameworks are free and open sourced including python. 
You can even get a job for learning python, because it is in the top 10 most wanted programming languages list.

Differences and similarities between Matlab and Python

Sl. No Python Matlab
1. Python has the same number of letters in its name as matlab Even Matlab has the same number of letters as python
2. Python is open sourced Matlab is not.
3. Python has tons of users Matlab doesn't have as many users as python
4. Python has tons of frameworks to use in it many fields including scientific, web, application development Matlab is best useful for scientific computing.
5. You can do all the work with python that Matlab can do. The same is not true in case of Matlab
6. There are thousands of people who are ready to help you if you have any doubt. The response time is better than Matlab The same is not true in case of Matlab
Okay I am convinced. Where can I learn python?
There are number of websites which teach you python for free. My only suggestion is not to waste your money for learning python. I will give you a pattern based on my experience on how to learn python.

For beginners(Who are new to computer programming)


  1. Go to codecademy, signup and start learning Python.(Take your own time to complete the course, don't compare yourself to others.)
  2. Read Learn Python the hard way.
  3. Read How to think like a computer scientist. The book is free, you can read it in HTML version or pdf version.
  4. Read the python documentation.(Fell free to choose any one of the documentations, python2 or python3)
  5. You are done. Go change your Resume first. 
For beginners(Who know Matlab or any other programming language(only basic concepts)) 

  1. Go read How to think like a computer scientist for free.
  2. Read the official documentation of python
  3. Go change your resume.
As you are not new to programming you can skip 1,2,3 steps which the beginners have to do. But if you have time go complete steps 1,2,3 also("Practice makes man perfect").

How many weeks will it take me to learn python?

It depends on the time you spend each week and the areas you want to apply your programming language. If you want to use python just instead of Matlab it will take you about a week if you can spend 4-5 hours a day(approx.). It also depends on how speed you can learn. But remember that it doesn't depend on the time you have spent it depends on how much you have understood about python. So take your own time to make it.

I am not able to understand a few concepts in Python(documentation or any other). What should I do?

Failure are the secret of success. Remember that if don't understand any concept then type google.com in your favorite browser and then type your question. I am sure that you will find a relevant answer to your question. Also feel free to ask the python community on stackoverflow(A best place to find the solution to your question) or any other forums. One of the search results you may get for your question is again the documentation. Go to the documentation and read it, you doubt will for sure be cleared.

 I have learnt python and understood it, but I am not able to use it. 

Be happy that you have understood all the concepts in python. Remember that for every common functionality there is a builtin function in python. Go google your question and read the solution by some programmers and you will be good to go.

Thank you for this post. How can I help you?

If you read the official documentation you will find that it is not suitable for beginners. But reading the documentation is the way to heaven to python. 
So I took the notes of the python official documentation which is available here: Github python_notes. All contributions will be recognized. 

Will there be any change in content of Radius of Circle?

Well, I am not sure whether I will change all the post which I have already written on this blog, but I will use python in my future posts. It should be remembered that the posts will contain both the Matlab Program and Python Program but I will explain the python program in the explanation section.

Final Note

I have tried to explain everything in this post in such a way that it is easy for everyone to understand. But if you have not understood anything or have any doubt then please do contact me or comment in the comment box below. You can contact me from here: Contact me. Please do give your feedback in the comment box below.
"There is always something to improve"
The above table has been generated using HTML Table Generator
Note: All the above written content may or may not be true. It is the responsibility of the user to check whether the data is true or false. Also in this post we are not against Matlab, we are only stating the advantages that python has when compared to Matlab. Matlab is a registered trademark of The MathWorks, Inc

Popular posts from this blog

Making a quiz web app with python and flask

Edit : When you are creating a web app with h tml templates, then y ou will have to sa ve the html file in templates folder in the Current Wor ki ng Directory( CWD). If you save the file in the C W D directl y you will get a TemplateNotFound error. Thank you Udhay for pointing it out.   In this post we will create a quiz website using python . I will be using the flask framework . After reading this tutorial you will learn form submission , flask templates , python code in flask templates , shuffling the questions and options with the random module and few others.  Please note that this tutorial is not big as it seems to be. Some of the code has been rewritten to maintain consistency and also font size is somewhat big so that your eyes won't get stressed reading this tutorial. Also the content has not occupied the full width of the page. In this tutorial I am assuming that you are having a very basic understanding of the flask framework . Please refer the documentation

Problem 11 Project Euler Solution with python

Largest product in a grid In the 20×20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 04 52 08 83 97 35 99 16 07

Problem 60 Project Euler Solution with python

Prime pair sets The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for a set of four primes with this property. Find the lowest sum for a set of five primes for which any two primes concatenate to produce another prime. This problem is j u st a brute force problem. If you have come here because you don't know the limit upto which you will h ave to gener ate the prime numbers t hen go ahe ad and t r y with 10,000 . When I first start ed solving the problem I chose 1 million(beca use most of the problem s on project E uler have this limit ), but it took very long for the computer to fin d the solution. After searching on the internet then I found many people choosing 10, 000 so I have changed my in put f rom 1 million to 10000 and the output was f ast. He