Join Patrick Royal for an in-depth discussion in this video Using built-in functions and variables, part of Learning MATLAB.
In this video, let's take a look at functions in MATLAB. …Basically, a function differs from a script in that it has a fixed input and …output channels. This makes functions extremely useful for …when you're writing complicated programs that might repeat the same calculations …over and over again. Rather than rewriting your code, you can …simply pull out that part of it into a separate function. …MATLAB ships with a wide variety of functions already implemented. …So we'll start by going over how to use those. …Perhaps the most commonly used functions are matrix generation functions which are …used to create a matrix with certain starter data.…
As an example, let's type in a equals ones 2,3 in the command Window. …This tells MATLAB to generate a new matrix with two rows and three columns …and then set all of the values in that matrix to ones. …The zeros function does the same thing with zeros, the rand function does the …same thing with random numbers and so on. The important thing to note here is that …
- Installing MATLAB
- Working with MATLAB variables
- Working with matrix and scalar operations
- Creating functions
- Understanding performance considerations
- Building basic plots
- Creating responsive programs
- Editing variables manually
- Working with the Statistics Toolbox
Skill Level Intermediate
1. General Concepts
2. Core MATLAB Syntax
3. Programming in MATLAB
4. Data Representations
5. External Toolboxes
- 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.Cancel
Take 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.