How can i find value tends to zero. means value near by zero.
1 回表示 (過去 30 日間)
古いコメントを表示
l(:,:,1) =
-0.2881
l(:,:,2) =
-0.2823
l(:,:,3) =
-0.2775
l(:,:,4) =
-0.2767
l (:,:,5) =
0.2733
l(:,:,6) =
-0.3245
I want value near by zero, with Layer No L. example for maximum value
[maxV, L] = max(l);
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 2 月 1 日
[maxV, L] = max(l, [], 3);
2 件のコメント
Walter Roberson
2016 年 2 月 1 日
You can find the indices by looking at min(abs(l),[],3) and then to get the corresponding values you can index the original matrix at those locations. Someone had a trick for doing that with the layers, but I do not recall what it is at the moment; I usually code the equivalent of sub2ind()
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!