Filter löschen
Filter löschen

third index in three dimention array

2 Ansichten (letzte 30 Tage)
Rd
Rd am 24 Jul. 2020
Kommentiert: Stephen23 am 24 Jul. 2020
kindly explain me about the following line
Vt = zeros(img_h, img_w, 4);
i know the following line if(img_h=2, img_w=3)
zeros (img_h, img_w)=[0 0 0; 0 0 0]
but i cant clearly understand the third dimention

Akzeptierte Antwort

KSSV
KSSV am 24 Jul. 2020
You matrices can be 1D, 2D, 3D or nD...where D stands for dimensional.
A = zeros(2,2,2) ;
The above A has 2 matrices of size 2X2 having zeros.
B = ones(3,4,5) ;
The above matrix has 5 matrices each os size 3*4.
I = imread("cameraman.tif") ;
size(I)
Check the size of I above. So nD matrices are possible, in your case third dimension stands for that.
  1 Kommentar
Rd
Rd am 24 Jul. 2020
Thank you for your clear explanation

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

madhan ravi
madhan ravi am 24 Jul. 2020
Imagine that 2 X 3 matrix is copied 4 times.

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by