How to save multiple 2D arrays in a third dimension in simulink?
25 views (last 30 days)
Samatha Aleti on 30 Apr 2020
You can accordingly place a condition for concatenating each 2D array to a 3D array. Here is a sample code(modified code of Sindar's):
N = 10; % Let Num of 2D arrays
my2Darray = randi(50,100,8);
my3Darray(:,:,ind) = my2Darray;
% check for "1" in last column and remove concatenation of 2D array if there is no "1"
if all(my2Darray(:,end) ~= 1)
my3Darray(:,:,ind) = ;