Understanding higher dimension in MATLAB
Afficher commentaires plus anciens
Hello all, I am trying to understand about higher dimensions in MATLAB, but not getting it clearly.
For example: a = rand(2,2); ----(1)
I understood that above command in MATLAB will produce random variable "a" having 2 rows and 2 columns.
But I am not getting what will be the output of say b = rand(2,2,3) or b = rand(2,2,3,4) indicates.
Thus my main query is that I am not understanding properly about higher dimension in MATLAB.
Any help in this regard will be highly appreciated.
3 commentaires
Dyuman Joshi
le 23 Jan 2024
"But I am not getting what will be the output of say b = rand(2,2,3) or b = rand(2,2,3,4) indicates.
The output will be a 2x2x3 array or a 2x2x3x4 array.
They are just arrays in higher dimension.
"Thus my main query is that I am not understanding properly about higher dimension in MATLAB."
What exactly are you not understanding?
Stephen23
le 24 Jan 2024
A whimsical proposal for some names of dimensions (hopefully with minimal overlap with technical terms):
- row (TMW & maths)
- column (TMW & maths)
- page (TMW)
- book
- shelf
- section
- library
- corpus
See also:
Dyuman Joshi
le 24 Jan 2024
I was going to propose floor between section and library, but unfortunately that overlaps with floor.
And storey/level does not have the same fit to it.
Réponse acceptée
Plus de réponses (1)
In general,
a=rand(M,N,P,Q)
means that a will return a number when you give it 4 subscripts a(i,j,k,l) for any combination of subscripts in the ranges,
1<=i<=M
1<=j<=N
1<=k<=P
1<=l<=Q
and similarly for higher dimensions.
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!