Written and maintained by CASRAI Editorial Board
Last updated
MATLAB is used to analyse numerical data, develop algorithms and visualise results in engineering and scientific research. MathWorks describes it as a programming and numeric computing platform for engineering and scientific applications, and as a programming and numeric computation environment for algorithm development, data analysis and visualization. This guide covers what that means for a researcher, how to get access from the official source, and one documented first task you can run end to end.
What MATLAB is used for in research
MathWorks says MATLAB combines a programming language, interactive apps and highly specialised libraries. In research practice that supports four kinds of work, each traceable to MathWorks documentation:
- Data analysis. MathWorks lists interactive apps for data analysis and visualization, and the
readtablefunction creates a table from column-oriented data in a text file or spreadsheet (JSON, XML, HTML and Word documents are also supported). - Algorithm development. The product page names algorithm development as a core purpose. Two CASRAI guides show MATLAB functions in this role:
mahalin Mahalanobis distance anddeconvlucyin Richardson-Lucy deconvolution. - Visualisation. The documentation states that graphics functions include 2-D and 3-D plotting functions to visualize data and communicate results.
- Modelling and simulation. MATLAB is the foundation for Simulink, a block diagram environment for modelling and simulating multidomain systems, which can also generate embedded code.
Toolboxes extend the base product. MathWorks describes them as professionally developed, tested and documented add-ons for specialised engineering and scientific workflows. MathWorks lists academic teachers, professors and researchers among its users, and industries such as automotive, aerospace and energy, with systems such as autonomous and connected vehicles and smart medical devices.
Where it sits next to other analysis tools
For a comparison of two other tools used for statistical analysis, see SPSS vs. R for statistical analysis. For how MATLAB-style numerical arrays relate to storage formats for scientific data, see HDF5 vs Zarr vs Parquet. Econometric work, one of the fields where researchers choose between such tools, is outlined in What is econometrics?. If you publish MATLAB-based results, the idea of rerunning the same code on the same data is defined in computational reproducibility.
Install or access (official source only)
Use MathWorks directly. According to the MATLAB product page:
- Installers are available from the MathWorks Downloads page.
- A free trial is offered.
- If you are at a company or university, sign in to find out whether your organisation provides access.
The MATLAB documentation has an Installation and Configuration section covering installing products and updating an existing installation. Do not download MATLAB installers from third-party sites.
First task: load a data file and plot it
The commands below come from the MathWorks reference pages for readtable and plot. The data file name is a placeholder for your own file.
- Put a column-oriented data file (for example a CSV or spreadsheet) in your current folder.
- In the Command Window, read it into a table:
T = readtable(filename), wherefilenameis the file name in quotes. The documentation saysreadtabledetects delimiters and data types automatically. - Look at the first rows. The documentation’s own examples display the first five rows and first four variables with
T(1:5,1:4). - Plot two variables from the table with
plot(tbl,xvar,yvar), which plots the variablesxvarandyvarfrom the tabletbl. Applied to the table above, this isplot(T,xvar,yvar), with the two column names in place ofxvarandyvar. - Label the graph with the
title,xlabelandylabelfunctions, as theplotreference page does.
If your data are already in two numeric arrays, plot(X,Y) creates a 2-D line plot of the data in Y versus the corresponding values in X.
Output and how to read it
readtable returns a table, so each column of your file becomes a named variable in T. Check that the variable names and the number of rows match what you expect in the source file before you analyse anything. The plot is a 2-D line plot of one variable against another; it shows the relationship between the two columns you chose and nothing about the others. MathWorks also offers a free two-hour online MATLAB course and a set of getting-started tutorials, including Desktop Basics and 2-D and 3-D Plots, if you want a guided walk-through of the environment.
Troubleshooting
- The table has the wrong columns or types.
readtableguesses delimiters and data types automatically, so open thereadtablereference page and look at its options for the file type you are importing. - Installation or update problems. Start from the Installation and Configuration pages of the MATLAB documentation, and from the sign-in at MathWorks if your access comes from an organisation.
- A function is not found. Toolboxes are add-ons for specialised workflows, so check the function’s reference page in the MATLAB documentation to see which product it belongs to.
Free alternatives
| Tool | What the project says |
|---|---|
| GNU Octave | Free software licensed under the GNU General Public License (GPL). Its syntax is largely compatible with MATLAB, it is described as drop-in compatible with many MATLAB scripts, and it has built-in 2D/3D plotting and visualization tools. |
FAQ
What is MATLAB used for?
MATLAB is used for data analysis, algorithm development and visualization in engineering and scientific work, and as the foundation for Simulink modelling and simulation.
Is MATLAB a programming language?
MathWorks says MATLAB includes a programming language, together with interactive apps and specialised libraries.
Can I run MATLAB scripts for free?
GNU Octave is free software and its project site describes its syntax as largely compatible with MATLAB, so many scripts can run there. Compatibility is not complete, so test your scripts.
How do I get MATLAB through my university?
MathWorks tells company and university users to sign in to find out whether their organisation provides access.
Sources
- MathWorks, What is MATLAB?, checked 2026-10-29.
- MathWorks, MATLAB product page, checked 2026-10-29.
- MathWorks, Getting Started with MATLAB, checked 2026-10-29.
- MathWorks, readtable reference, checked 2026-10-29.
- MathWorks, plot reference, checked 2026-10-29.
- GNU Octave, octave.org, checked 2026-10-29.








