How to access elements of an array in MATLAB?

In general, you can use indexing to access elements of any array in MATLAB regardless of its data type or dimensions. For example, directly access an element of a vector. For higher-dimensional arrays, expand the syntax to match the array dimensions. Consider a random 3-by-3-by-3 numeric array.
For More Information Please Refer:
https://www.mathworks.com/help/matlab/math/matrix-indexing.html
You May Also Like to Read: