From the course: MATLAB 2018 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Overview of arithmetic, comparison, and logical operators

Overview of arithmetic, comparison, and logical operators - MATLAB Tutorial

From the course: MATLAB 2018 Essential Training

Start my 1-month free trial

Overview of arithmetic, comparison, and logical operators

- [Instructor] Once you bring values into MATLAB and store them in variables, or perhaps just type them in, you can perform several types of actions with them. The symbols you use to indicate those actions, called operators, let you do arithmetic calculations, compare values, and evaluate logical expressions. In this movie, I'll review the most commonly used MATLAB operators and show you how to use them in a script. I'll start with a presentation and then move to the command window. We'll start with mathematical operators, which, again, let you do arithmetic calculations. Most of them are common and you've likely seen them before. We have the plus sign for addition, the minus sign for subtraction, the asterisk for multiplication, and the forward slash for division. So, for example, seven divided by 14 is 0.5 or one half. An operator you might not have seen before is the divides into operator, and this is a backslash. So, for example, seven goes into 14 twice. So, seven forward slash…

Contents