w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
MATLAB List values above threshold

If you only want to know the values, use logical indexing, like this:

result = A(A>1.61);

If you want to obtain the result for each third-index-layer of a 3D array B, you can do it with cells:

result = cellfun(@(x) x(x>1.61),
squeeze(mat2cell(B,size(B,1),size(B,2),ones(1,size(B,3)))),'uni',0);

Then result{1} gives the values corresponding to B(:,:,1), etc.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.