position of the element have small value
1 次查看(过去 30 天)
显示 更早的评论
A=
3 4 5 6 7
1 2 4 9 4
5 3 0 7 6
6 0 1 8 5
2 9 8 1 3
find the position of min value in each column sore the position in the variable
for first coln min value is 1 now the position (1,2) p=1 q=2 like that next iteration take second column and find the position
0 个评论
采纳的回答
更多回答(1 个)
David Sanchez
2013-10-22
A= [
3 4 5 6 7;
1 2 4 9 4;
5 3 0 7 6;
6 0 1 8 5;
2 9 8 1 3];
[C I] = min(A,[],1);
C is the array of minima.
I is an array with the positions of the minimum value in the columns of A.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!