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!