フィルターのクリア

Multi-dimentional arrays with matlab

3 ビュー (過去 30 日間)
Donna Paulson
Donna Paulson 2019 年 2 月 7 日
編集済み: Donna Paulson 2020 年 6 月 8 日
I have been working on arrays with matlab and i came across a problem that can only be solved with multii dimentional arrays and i have read that one cannnot work with multi dimentional arrays without updating drivers in matlab, however i also read that i can create a mechanism with functions that can enable me to work with multi dimentional arrays, please help.

回答 (2 件)

Stephen23
Stephen23 2019 年 2 月 7 日
編集済み: Stephen23 2019 年 2 月 8 日
"i have read that one cannnot work with multi dimentional arrays in matlab"
Instead of reading incorrect and/or misleading statements on the internet, it is much more reliable to read the MATLAB documentation:
It is very easy to create or work with ND arrays, you can use indexing, vectorized code, etc., just like with vectors and matrices. Here is an array with size 5x4x3x2:
A = rand(5,4,3,2);
All numeric arrays, cell arrays, structure arrays, string arrays, and character arrays can be multi-dimensional. In fact, for those classes MATLAB makes absolutely no distinction between scalars, vectors, matrices, and ND arrays: they are all the same class of object. Or, to put it another way, in MATLAB:
  • scalars are just 1x1x1x1x... arrays.
  • vectors are just Mx1x1x1 or 1xNx1x1x1x... arrays.
  • matrices are just MxNx1x1x1x1... arrays.
  • all arrays are just MxNxPx.... arrays!

Ranjith veeran
Ranjith veeran 2019 年 2 月 7 日

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by