Trouble using 3D Matrix and removerows command

1 view (last 30 days)
for i = 1:length(land_B_acq(1,1,:))
KB=find(land_B_acq(:,5,i) > mean(land_B_acq(:,5,i))+2*std(land_B_acq(:,5,i)) & land_B_acq(:,5,i) < mean(land_B_acq(:,5,i))-2*std(land_B_acq(:,5,i)));
land_B_acq=removerows(land_B_acq, 'ind', KB);
end
KB will work fine and tell me the rows where (mean + or - 2x std) is > or < the compared value. But, when I want to save the removerows output, it takes away the 3rd dimension of the matrix and stores everything in a 2d matrix.
My programming skills are only moderate.
land_B_acq is a 24x8x3 matrix and must keep the 3rd dimension.
Thank you.

Answers (0)

Categories

Find more on Denoising and Compression in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!