Converting a 4d vector to 2d vector
조회 수: 5 (최근 30일)
이전 댓글 표시
Dear
I would like to convert the following 4d vector to a 2d vector.
input:
Y(:,:,1,1)=0
Y(:,:,2,1)=1
Expected output:
Y1(1,1)=1
Y1(1,2)=2
Thanks,
댓글 수: 0
채택된 답변
Jos (10584)
2019년 2월 23일
Y = randi(10,1,1,3,4)
Y2 = squeeze(Y) % remove singleton dimensions
help squeeze
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!