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.

Explore arithmetic, comparison, and logical operators

Explore arithmetic, comparison, and logical operators - MATLAB Tutorial

From the course: MATLAB 2018 Essential Training

Start my 1-month free trial

Explore arithmetic, comparison, and logical operators

- [Teacher] I've switched over to MATLAB, and you can see, here, that I have the Command Window and I'm not working with any sort of a script file. And, I'll just run through a number of examples. Let's say that I have seven plus three, enter. It gives me 10, and if I do five, and then a forward slash for division, by 10, and enter, I get 0.5. However, remember, I can also use the divides into. So, if I do five, followed by a back slash, and then 10 and enter, then I get the answer of two. And, what that means again, is five divides into 10 twice. If I want to demonstrate the order of operations, I can do five plus three times nine, and that should give me 32, because I do three times nine, first, followed by five, enter, and I get 32. However, if I want to change the order of the operations, then I can type a left parentheses, then five plus three, close the parentheses, you see that MATLAB indicates that I did with a blue highlight, and then multiplied by nine and I should get 72, I…

Contents