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