From the course: Accelerated MATLAB
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Multi-dimensional arrays: Handling and operations - MATLAB Tutorial
From the course: Accelerated MATLAB
Multi-dimensional arrays: Handling and operations
- [Instructor] In the previous video, we walked through on how to create multidimensional arrays. In this one, we will go over some of the basic operations that can be performed with these arrays. First, let's see how we can access any of the elements in these arrays. So similar to the two-dimensional arrays, you have to specify the indices for each dimension. Let's start with a two-dimensional array, A1, which is equal to one to five, which has one row and five columns. And then we are going to create a multidimensional array from that. So, A1(:,:,2), which will have two pages. And the second page will be with elements that are going from one to nine in a step of two. And I'm going to keep the original array here so that we can see the numbers. Let's say, for example, we want to access the element in the first page, first row, and third column, then we will type A1(1,3,1). And this will give us the value of the element that is in the first page, third column, and first row. Or, for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.