필터 지우기
필터 지우기

Extract last column in a 4x4x4x4 matrix

조회 수: 1 (최근 30일)
Bootstrap2110
Bootstrap2110 2017년 11월 22일
편집: Bootstrap2110 2017년 12월 6일
I have a 4D matrix from which I am trying to extract the last column. I have tried y(1,2,2,:) but this is producing a matrix of size (1,1,1,2000) where 2000 is the length of my last index. I want the size to be (1,2000).
MATLAB Version: 8.4.0.150421 (R2014b)
Any help appreciated.
Thanks Vikrant

답변 (1개)

KL
KL 2017년 11월 22일
I do not understand the connection between your title and the content of your question. Anyway if you want to extract the last column of your 4-D matrix, it's very simple,
A_last_col = reshape(squeeze(A(:,end,:,:)),1,[]);

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by