This lesson will define MATLAB and talk about this software program's uses and usability. We'll discuss the MATLAB environment, programming language, graphing and math function, and API.
You must have seen graphs tracking hurricanes and pie charts depicting population samples across the globe. When there is a large amount of scientific data to analyze, one of the methods to organize it and create a visual representation is by using software called matrix laboratory, or MATLAB.
MATLAB is a computer programming language that uses computations and algorithms to analyze large amounts of data and present it in visually appealing formats. Some features of MATLAB include:
computation of numeric data
creating graphics for scientific use
modeling and simulating data
MATLAB is a software system that has many components. Let's go over some of them here.
The MATLAB environment is the way the program presents itself and the tools available. The MATLAB environment allows you to run commands, manage your files, and even analyze data. It has a command window where you can write simple commands. The command window can be thought of as similar to a high performing calculator. For example, you can type in a formula (5+2)*3 and click the Execute button and MATLAB will display the result.
The MATLAB work environment provides tools that allow you to run and debug programs, install add-ons, change fonts and displays, and has functions that you can call to perform common tasks. For example, if you have the coordinate points x and y, you can use the MATLAB plot function to create a graph using the values of x and y.
Screenshot of the MATLAB environment
MATLAB Programming Language
The MATLAB programming language is simpler than most programming languages and easier to learn. It is known as a high-level language because it is closer to the human language than the computer or machine language.
The semi-colon in MATLAB indicates the end of statement. It can also be used to stop a statement from executing. For example, if you type in x=5+3 without the semicolon and click the Execute button, MATLAB will display the result as x=8. If you type in x=5+3; with the semicolon, and click Execute, MATLAB will not display the result of the computation.
The % sign is used to indicate that the text following is a comment and not to be interpreted by MATLAB. Programmers use comments to provide explanations about the code they are writing. For example, in MATLAB you can write a=b+5 and the use the % sign to explain that 'a' is the length of a room and 'b' is the width.
Variable names in MATLAB are case sensitive. For example, if you create a variable 'TempEveryHour' to represent the temperatures every hour, and need it to use this variable in a mathematical formula, you would need to call the variable by its exact same name: TempEveryHour and not TemperatureEveryHour or tempeveryhour.
Graphs and Math Functions
MATLAB has inbuilt functions to create high quality 3-D graphs that helps us to visualize data. The mesh function creates a graph that looks like a 3-D wire mesh. And the contour function plots a graph with contour lines. The slices and points on the graph can be color coded to make the graph easier to understand and model the data in real time.
MATLAB has a large collection of mathematical functions that can be used to perform complex mathematical and scientific computations. For example, the sqrt function calculates the square root and the avg function can be used to calculate the average.
Over 79,000 lessons in all major subjects
Get access risk-free for 30 days,
just create an account.
The MATLAB Application Programming Interface, or API, allows you to write software programs in other computer languages such as C, C++ and Fortran, and call MATLAB functions from these programs. Since MATLAB has a large collection of predefined mathematical functions, this helps the programmer save time and improve efficiency, since they don't have to write code for already available functions.
For example, you can call the MATLAB function 'mesh' from your C program to easily create a 3-D wire graph plot to display large amounts of data.
MATLAB is a computer programming language that uses computations and algorithms to analyze large amounts of data and present it in visually appealing formats. MATLAB is a computer programming language that has inbuilt capabilities for complex mathematical computations and creating complex scientific graphs.
The MATLAB environment is the way the program presents itself and the tools available. Th MATLAB environment allows you to run commands, manage your files, and even analyze data.
MATLAB is a high-level language (closer to human language than computer language) that is easy to understand and uses the percent sign (%) to indicate comments and the semi-colon (;) to indicate the end of a statement.
The MATLAB Application Programming Interface, or API, allows you to write software programs in other computer languages, saving time for programmers.
Did you know… We have over 200 college
courses that prepare you to earn
credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the
first two years of college and save thousands off your degree. Anyone can earn
credit-by-exam regardless of age or education level.