Join Patrick Royal for an in-depth discussion in this video Working with MATLAB variables, part of Learning MATLAB.
Let's take a look at how to create and manipulate basic MATLAB varialbes. …To start with, we're going to need some variables. …For now, I'll use the simplest method of creating variables, typing in command window. …Defining a new variable in MATLAB is very easy. …Unlike in other programming languages like C or Java, there's no need to add a …variable declaration statement. In other words, you don't need to tell …MATLAB something like, this variable is an integer, or this variable is a string. …Instead, all you need to do is tell MATLAB what your variable is equal to, so …let's do that now. In the command window, type A equals 1 …and press Enter. This causes three things to happen.…
First, the command window gives you back the result that A equals 1. …Obviously, that isn't particularly useful now but if the variable had been defined …as some complicated function, it would help to know it's exact value. …Second, the command history updates to include the latest command. …Third, the workspace now shows a new variable called A with a value of 1 and a …
- 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.