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.
Examine values using the is statements - MATLAB Tutorial
From the course: MATLAB 2018 Essential Training
Examine values using the is statements
- [Instructor] Writing MATLAB scripts requires you to check the data your code creates and receives as input. The MATLAB language includes a number of functions you can use to ensure the data that you're working with is of the type you expect. I'll show you how to use those functions in this movie, and I'll start with an overview in PowerPoint and then I'll switch to MATLAB. These are called the is family of functions, and you'll see why very quickly. isequal returns true if two statements are equal. In other words, if you have the same word or the same number, then that would be an example where isequal would return a logical one or true. If they were different, it would return a logical zero or false. ischar, or iscar, as some people pronounce it, returns true if a value is a character. iskeyword takes a slightly different approach, and it returns true if a value is a reserved word. In other words, there are certain function names and other reserved words in MATLAB that you really…
Contents
-
-
-
-
-
-
Include if and if-else statements in a script7m 28s
-
(Locked)
Apply conditional logic using Switch5m 26s
-
(Locked)
Examine values using the is statements3m 21s
-
(Locked)
Use is statements3m 45s
-
(Locked)
Perform operations multiple times using for loops7m 29s
-
(Locked)
Perform operations while a specific condition is true5m 19s
-
-
-
-