Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Considering a 3D matrix of generic dimension n. How to delete the first column of the first matrix, the second column of the second matrix, the third column of the third matrix, and so on.
조회 수: 1 (최근 30일)
이전 댓글 표시
% Considering 3D matrix of dimension n
n=3;
for a=1:n
for b=1:n
for c=1:n
A(b,c,a)=c;
end
end
end
댓글 수: 0
답변 (2개)
KSSV
2017년 11월 21일
% Considering 3D matrix of dimension n
n=3;
for a=1:n
for b=1:n
for c=1:n
A(b,c,a)=c;
end
end
end
%%To delete
iwant = zeros(size(A,1),size(A,2)-1,n) ;
for i = 1:n
iwant(:,:,i) = A(:,setdiff(1:n,i),i) ;
end
댓글 수: 0
Image Analyst
2017년 11월 21일
Mariana, I answered this long ago the first time you asked it: https://www.mathworks.com/matlabcentral/answers/368240-considering-a-3d-matrix-how-to-delete-the-first-column-of-the-first-matrix-the-second-column-of-th#answer_292235
I'm closing this one since it's a duplicate question.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!