Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

covert into 3D array

조회 수: 1 (최근 30일)
Tha saliem
Tha saliem 2017년 4월 15일
마감: MATLAB Answer Bot 2021년 8월 20일
hey i have a 2D array having many elements like this:
y=[4,1,1; 4,1,1; 4,1,1; 3,1,1; 4,1,-1; 3,1,-1; 4,1,1]
& a cell array:
x{1,1}={4;4}
x{2,1}{4;[3;4];[3;4]}
i want to compare elements of x with 1st column of y and convert that array into a 3D array accordingly.
thanks in advance.
  댓글 수: 1
Tha saliem
Tha saliem 2017년 4월 15일
result(:,:,1)=[4,1,1]
result(:,:,2)=[4,1,1]
result(:,:,3)=[4,1,1]
result(:,:,4)=[3,1,1;4,1,-1]
result(:,:,5)=[3,1,-1;4,1,1]

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by