Join Curt Frye for an in-depth discussion in this video Performing conditional steps using if statements, part of Learning Octave.
…One of the capabilities built into any…modern programming language, is conditional execution of code.…What that means, is that a programming environment such as…Octave, can check to see whether a particular condition is true.…If it is, then it can execute or not execute code as you desire.…In this movie, I will show you one way…to do that conditional programming in Octave using if statements.…I will provide a basis overview in PowerPoint and then I'll switch…over to Notepad to create a script that we can run in Octave.…
The basic if statement has three components.…The first, is the if statement, which has a condition in parentheses.…And I'll show you how to do that, once I get into the demonstration part.…Then, in the middle, you have the statements…that are executed if the condition is true.…And finally, the endif statement, which indicates the end of the if block.…Note, that the endif statement is all one term.…There's no space between the d and the i.…
If you want, you can have Octave execute code if…the condition is true and if the condition is not true.…
Author
Released
1/23/2014- Downloading and installing Octave
- Using built-in commands
- Manipulating strings
- Defining vectors and matrices
- Defining functions
- Creating executable scripts
- Debugging your Octave code
Skill Level Intermediate
Duration
Views
Related Courses
-
Learning MATLAB (2013)
with Patrick Royal1h 30m Intermediate -
Learning R
with Barton Poulson2h 25m Beginner
-
Introduction
-
Welcome51s
-
-
1. Introducing Octave
-
Downloading Octave2m 58s
-
Installing Octave1m 25s
-
Getting help in Octave3m 49s
-
-
2. Surveying Basic Octave Commands
-
Using built-in commands5m 35s
-
Manipulating strings6m 14s
-
-
3. Manipulating Matrices
-
Generating useful matrices5m 43s
-
4. Managing Executable Octave Programs
-
Sending output to the screen4m 35s
-
Sending output to a file4m 25s
-
Defining a function7m 59s
-
Debugging your Octave code6m 38s
-
-
5. Plotting Data
-
Creating a simple plot2m 32s
-
Creating a scatter plot3m 24s
-
-
Conclusion
-
Next steps1m 29s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Performing conditional steps using if statements