Understanding higher dimension in MATLAB
Ältere Kommentare anzeigen
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 Kommentare
Dyuman Joshi
am 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
am 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
am 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.
Akzeptierte Antwort
Weitere Antworten (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.
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!