# What is MATLAB and who needs it?

Every programmer has a favorite programming language, and they usually try to sell it like it’s the greatest language… “it’s the best language!”, “You gotta start learning this one!” and so on. Well, I’m not your typical programmer. MATLAB is by far my favorite language, but I’m not going to try to sell MATLAB or convince you that you need to learn it. Instead, I want to tell you what MATLAB is really great at, where and how MATLAB is used, and what you will gain from mastering MATLAB. And then I’ll tell you how to get from the “baby-steps” of MATLAB programming to becoming a master MATLAB programmer.

**A brief history of MATLAB**

(If this paragraph seems like “ancient history,” then that’s great, because it means you are getting a jump-start on your career!) When computers started being used by universities and companies in the 1960’s and 1970’s, they were BIG (think about an entire room-sized computer that was basically just a fancy calculator). But more annoyingly, the available computer code was really difficult to learn. In the late 1970’s, the programming language FORTRAN was developed to help scientists and engineers implement mathematical formulas on computers (FORTRAN = formula translation). But FORTRAN also isn’t a very user-friendly language. Many people wanted to use computers for applied mathematics but struggled with writing computer code. (Side note: people have struggled with programming for as long as there has been computers! You’re not the only one!).

Enter Cleve Moler, who developed a language that was essentially a “wrapper” for FORTRAN. A wrapper is easy-to-use code that calls hard-to-use code, like a translator from “simplified English” to ancient Tibetan. This code allowed people to implement advanced mathematical formulas in FORTRAN libraries without having to master the FORTRAN language. In the early 1980’s, Moler joined forces with Stanford engineers Jack Little and Steve Bangert, and together they created the MATLAB program.

MATLAB stands for “matrix laboratory.” The initial idea was to build up the wrappers for libraries that implement the numerical processing underlying mathematics, with a strong focus on applied linear algebra and matrix decompositions. Since those early days, MATLAB has grown to be much much more than a simple wrapper. But it retains its two core themes: An accessible language that non-programmers can easily learn and use; and a strong focus on applied mathematics in education, research, and industry.

**MATLAB for scientific programming**

The universe is a really, really, *really* vast and complex place. In fact, we understand so little of the universe that we don’t even understand how much we don’t understand. On the other hand, engineers, physicists, and biologists have developed incredible machines to measure the things inside the universe, everything from radars to thermometers to MRIs to tiny electrodes that measure the electrical impulse from individual brain cells.

How can we make sense of the increasingly big data that these machines are giving us? I bet you can guess what I’m going to write next — put the data into MATLAB and do lots and lots of analyses, modeling, and visualization!

Computer code that is optimized for data analysis, modeling, simulations, and visualizations is generally called “scientific programming,” and that is where MATLAB really excels. And this brings me back to the first paragraph of this blog: Should you learn MATLAB? If you are interested in learning or having a career in science, mathematics (abstract or applied), engineering, computational biology, physics, or data-oriented finance, then the answer is Yes, you should learn MATLAB.

I use MATLAB in two ways. First and foremost, as a way to analyze large-scale, multivariate, multidimensional datasets. I run a neuroscience (brain science) research lab, in which we measure tiny electrical impulses generated by thousands of brain cells to understand how those cells process sensory information and coordinate with each other to produce brain activity that spans multiple orders of magnitude in time and in space. And to answer your questions: Yes, brain science is hard, and yes, it’s absolutely fascinating! There is no better program than MATLAB for our work.

The second way I use MATLAB is as a tool in teaching about data analysis and mathematics. Most people do not find staring at equations to be a good way to learn advanced mathematical concepts. Instead, a better way is to translate equations into MATLAB and then simulate and visualize them. I often say “you can learn a lot of math with a little bit of coding.”

**How to learn (and master) MATLAB**

There are two ways to learn MATLAB. First, you can search the Internet or youtube for free beginner MATLAB tutorials. You’ll find a ton of them. Unfortunately, most are not very good, but if you look long enough, you’ll find some good ones. The main problem is that the free tutorials tend to be either too basic to be beneficial, or too topic-specific to be generally useful.

Second, you can pay for educational material. Of course, paying for an education doesn’t necessarily guarantee high quality, but it does set the bar higher. Plus, imagine you pay for a course that you thought was terrible. You’ll leave a bad review so other students don’t waste their time and money. On the other hand, a good course will get good reviews, and you’ll know it’s worth your time and investment.

Still, most paid MATLAB courses are designed for beginners. You’ll learn about for-loops and functions, but real applications require moving beyond the basics to mastering the MATLAB language and desktop environment, and courses that build real mastery beyond the introductory level are hard to find.

This gap in MATLAB education was my primary motivation for creating my course called “Master MATLAB through guided problem-solving.” My course focuses on developing professional-level programming and problem-solving skills in scientific programming.

It’s not a typical course — I don’t say “here’s how you write a for-loop and here’s what this function does and blah blah blah.” Instead, I start by presenting real-world problems that scientists using MATLAB to solve, then give you an opportunity to work through the problems on your own — with or without some coding tips — and then I explain how I solve the problems.

One thing that I really like about this course is that many students have offered different solutions to the same problems. Sometimes even better solutions than my own! Do you think you’re a better scientific programmer than me? Challenge yourself and find out!

**Is MATLAB here to stay?**

If you are a serious programmer, then it is a mistake to learn only one language (it’s fine to master one and be OK at others). For scientific programming, MATLAB, R, and Python are all good languages to know. There has been some hype about Julia, and time will tell if it will become competitive for scientific programming.

Will Python supercede MATLAB? I don’t know, but I kindof doubt it. I haven’t seen a major push towards Python for scientific computing in my own field (other than the occasional flare-up on Twitter), in part because of an existing culture of sharing code and data in MATLAB format. Mathworks (the company that makes MATLAB) hires many smart and highly motivated people whose job is to make sure that MATLAB remains fully supported, internally consistent, future-proof, continuously developed, and with excellent support.

I don’t think I’d bet the farm on MATLAB dominating scientific programming for the next 100 years. But for the next 15 years, MATLAB mastery is a huge advantage to anyone interested in science, engineering, and applied mathematics.

**Interested in finding out more about MATLAB?**

Take a look at my Master MATLAB through Guided Problem Solving course, on Udemy. If you are interesting in solving real-world problems in MATLAB, advancing your research, career and studies, then this 38 hour course, is definitely right for you. Click the link above to find out more.