how to use function "find" over matrices
古いコメントを表示
Suppose x = rand(1e5,1e5);
I want to find the lowest number in each column of x without using for loop.
Is it possible?
採用された回答
その他の回答 (1 件)
David Hill
2020 年 4 月 9 日
min(x);
3 件のコメント
parham kianian
2020 年 4 月 9 日
編集済み: parham kianian
2020 年 4 月 9 日
David Hill
2020 年 4 月 10 日
x = rand(1e4);
a = x.*(x>.2&x<.25);
b=arrayfun(@(y)a(find(a(:,y),1),y),1:size(a,2));
parham kianian
2020 年 4 月 10 日
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!