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.
Define variables and constants - MATLAB Tutorial
From the course: MATLAB 2018 Essential Training
Define variables and constants
- [Instructor] The secret to creating flexible and powerful MATLAB scripts is to use variables effectively. As the name implies variables store changing values and can serve as the basis for calculations in your scripts or in the command window. In this movie I will work solely in the command window typing commands to illustrate how to use variables in MATLAB. Variables are named entities within MATLAB that let you store the result of a calculation or of a value that might change. Variable names must start with a letter and they are case sensitive. So for example if I were to type in VAR one equals three and enter then I would see VAR one equals three. If I were to display the value of VAR one I could try VAR one and enter, and I would get number three. However if I type capital VAR one and enter then it's undefined because I have not assigned a value to capital VAR one. You also see that the program has asked did you mean VAR one with a lower case V? And it offers that text for you…
Contents
-
-
-
(Locked)
Tour the MATLAB Workspace window3m 12s
-
(Locked)
Define variables and constants6m 15s
-
(Locked)
Overview of arithmetic, comparison, and logical operators4m 17s
-
(Locked)
Explore arithmetic, comparison, and logical operators4m 15s
-
(Locked)
Define ranges of values4m 45s
-
(Locked)
Summarize values using built-in functions4m 52s
-
Generate random numbers5m 35s
-
(Locked)
Get help in MATLAB4m 11s
-
(Locked)
-
-
-
-
-
-