Using Matlab for STEM Research

Using Matlab’s EEGLab to visualize EEG data.

In the fall of my first year I wanted to join a neuroscience research lab. I was hoping to contribute to meaningful research, network with helpful mentors, and develop new skills and qualifications. In retrospect I should have waited to adjust to Princeton and my new course-load before even beginning to think about labs. I didn’t, though, and as I sent a flurry of emails to lab directors, I soon ran into a barrier: I found it incredibly difficult to be accepted into a lab.

In their response to my email, one lab director told me that they preferred students with significant experience in the programming language Matlab. Although I’d used Matlab before, my trial subscription had long expired. Using the free software links available through the Office of Information Technology (OIT) website, however, I was able to download and use Matlab once more. I soon realized that a laboratory setting wasn’t necessary for me to conduct my own research. In fact, I actually felt empowered by the ability to choose my own research topic.

I decided I wanted my venture into Matlab to have something to do with epilepsy research. A quick google search revealed massive datasets of EEG data – that is, data gathered from an Electroencephalogram, a tool used to measure electrical signals resembling brain activation – from patients with epilepsy and healthy controls. After an hour of pushing buttons and tinkering around, I ended up settling on the “Classification Learner” app native to Matlab to handle this data: the app used half the data to identify differences between the datasets and then used the other half testing its new predictive model, effectively diagnosing epilepsy using EEG data. Surprisingly, the results were quite accurate: well above 90%. Thus, without even having any course experience in neuroscience or Matlab, I had miraculously diagnosed epilepsy in anonymous patients.

My usage of the epilepsy dataset and the Classification Learner are just two of many of the publicly available datasets and tools in Matlab. For the aspiring neuroscientist or molecular biologist, for example, free apps like EEGLab and the Bioinformatics Toolbox are either native to Matlab or easy to download and enable the analysis and visualization of EEG data and genome sequences. These data are both easily accessible and free to acquire, allowing you to research nuanced topics that fit your interests

As it once was for me, though, Matlab – by nature of being a programming language – is foreign to many students. Yet my point here isn’t that you should go out and develop a formal understanding of computer science to capitalize on Matlab. The key is to instead use the toolboxes Matlab offers – the software add-ons I mentioned above like EEGLab for analyzing EEG data: in many cases, these toolboxes have user-friendly interfaces, so the only “coding” necessary is selecting the directory of your data and pushing buttons to perform certain operations. Thus, knowing how to code — although undeniably a valuable skill — is made irrelevant for many computational projects. And if your project necessitates predicting certain outcomes or mapping data onto a curve, simple and relatively common mathematical operations are native to Matlab, accessible with a tap of the “Apps” tab on the top of the screen. This array of existing code and infrastructure allows researchers to minimize their learning curve, but also offers eager programmers the option of developing toolboxes and functions for themselves (excuse me for the horrible pun).

Matlab is not the only computational research tool available to students, nor is computational research the only way to pursue independent research for students in STEM. Although I initially pursued Matlab to develop a skillset necessary for a faculty-mentored research lab on campus, I was most impressed by the program’s powerful toolboxes and widely available datasets. Thus, Matlab is undeniably useful for STEM students and offers exciting avenues for independent research projects.

–Kamron Soldozy, Natural Sciences Correspondent