Should i learn python or matlab




















It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. I am a beginning PhD student in math, and I would like to focus on optimization.

I saw this question , and it appears that Python is extremely popular in industry, at least in optimization. I would be interested in answers from any field, not only optimization. Regardless of what completes the phrase "Python vs Very few people who are serious about using optimisation in production use MATLAB, and the ones who do can't wait to move away from it.

Seriously, if you want to be able to use your own code after your PhD, don't use commercial packages. From a programming perspective, I have personal experience in the bottlenecks. Nikos Kazazakis and EhsanK have given you great reasons for using Python.

In industry projects you will encounter many challenges and things you want to do, but you don't want to and shouldn't implement. Currently I work on a route planning software, most of what I do is sadly not core optimization work, but everything needed to making it useful for customers. Make imports from various data sources, integrating the data into objects doing this in a non object oriented language would be annoying , make your product available via an API, and so on.

This is to say I use a lot of things that come not out of the box. Adding numpy to that list of imports for the optimization work won't break the camel's back. All this is to say: needing to import an additional library for functionality shouldn't be used to determine usefulness of a language most of the time ;. I work for a company that offers a commercial optimization solver. We only get one or two queries about MATLAB interfacing with our product per year, but we get many times that amount of questions on interfacing Python with our product.

Many bluechip and non B. C companies already have Python in heavy use. If I were you, I would concentrate on becoming knowledgeable with Python, not just for optimization purposes, but it's very useful in other areas of computing too.

It is an excellent tool. I love it for doing something fast and not fussing with things; it's an industry standard in DSP and radar and other problems that rely very heavily on linear algebra. There is a lot of code written in it; it will be around for a long time to come.

You will become a much better programmer, and your job prospects will be much better, too. This is all the more true if we are talking about optimization, which is at least tangential to machine learning ML. But again and yes it is just my personal opinion , I would suggest you take a look at Julia. I have not been as excited about a language after trying Julia since I use all three at work, and Julia is my first choice most of the time; I think the language is truly going places.

But, I'm a risk-taker. It's not the safe move. If you want safe, the safe move is Python. I did my PhD on a topic involving numerical simulations of mechanical systems. Looking back, I wish I did my work in Python. I work in Software Engineering now and Python is a lot more applicable to other languages and looks better on a CV. Also - as mentioned by others here - Python is open source. This means that your results would be more accessible by others and easier to reproduce a big plus for research.

I am geophysics professor and have been solving scientific computing problems in Matlab since I have the following observations:. Code that my graduate students write is literally orders of magnitude slower than my Matlab for solution for matrices that arise from discretizing PDE's. How can this be, aren't both using the same libraries under the hood?

Yes, but clearly Matlab is much better at recognizing special forms of matrices and choosing optimized solvers for them. Once my graduate students have have put several weeks into optimizing their code, it is still much slower seconds vs. You may think my graduate students suck - but some of them are in a leading computational math graduate program.

One reason I am more likely to switch to Julia than Python is that many of the advertised advantages of Python, such as great string manipulation simply don't matter for scientific programming. Also the syntax is clumsy and verbose. Most people that know what they are doing are picking up Julia. Besides the downturns of commercial and closed software you should also keep in mind that MATLAB is a working universe in itself.

For example you can really quick do a program for image pattern recognition without having to much knowledge about image processing and link your code into another toolbox for autonomous driving just as an example, because that is something people like to forget about MATLAB. Python has a little bit steeper learning curve but for your case it is much worther I think. Sounds like you are intending to build solvers.

As you noted, matrix and vector operations are part of the language. You'll need matrix decompositions and maybe eigenvalue solvers to build your solvers, probably for dense and sparse matrices, and MATLAB has all of those. In the industry you rarely find yourself just code optimization algorithms or models in your daily work.

Python provides more flexibility in that sense and have more APIs developed to communicate with other tools or applications e. The trend in industry is that many companies are moving to Python or using Python as the primary languages for analytics work, which means you can get more support from your IT department in terms infrastructure and computational capacity.

For example, would your future employer's MATLAB capacity allow you to process tens of millions or billions of records? It is more likely that its Python infrastructure allows so because there are many other teams needing that capacity. In your industry career, you would sooner or later collaborate with e. Python is more widely used among them such as statisticians.

Have a look at the job description of your future ideal job and you will get a sense about what is needed. There are some inconsistencies in array notation that are very troubling. Matrix manipulation is extremely difficult and prone to error in Python. Yeah, it's free, but if it takes you a long time to try to build something that works, what good is that? Sign up to join this community. The best answers are voted up and rise to the top. Major engineering and scientific challenges require broad coordination across teams to take ideas to implementation.

Every handoff along the way risks adding errors and delays. Engineers and scientists trust MATLAB to send a spacecraft to Pluto , match transplant patients with organ donors , or just compile a report for management. This trust is built on impeccable numerics stemming from the strong roots of MATLAB in the numerical analysis research community. Engineers and scientists appreciate using tools designed for the way they work, with well-designed, well-documented, and thoroughly tested functions and apps for their applications.

Select a Web Site. Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:. Select the China site in Chinese or English for best site performance. Other MathWorks country sites are not optimized for visits from your location. Toggle Main Navigation. Search MathWorks. Close Mobile Search. Trial software Contact sales. In contrast, Python is a general-purpose programming language.

Engineers and scientists deserve tools that fit the way they work.



0コメント

  • 1000 / 1000