Only 1st layer of a 3D Matrix.
10 次查看(过去 30 天)
显示 更早的评论
I have this code and I am having issues trying to figure out how to just display the 1st layer with it's own variable.
Also another variable that displays the absolute central colum.
Thank you.
A = ones(5,5,3).*reshape(1:3,1,1,3)
0 个评论
采纳的回答
Asad (Mehrzad) Khoddam
2020-9-4
For layer 1:
A(:,:,1)
For layer i:
A(:,:,i)
For the central column:
A(3,3,:)
更多回答(1 个)
Walter Roberson
2020-9-4
ItsOwnVariable = A(:,:,1);
AnotherVariable = squeeze(abs(A(:,round(end/2),:)); %absolute, central ?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!