computing minimum for each rows
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi
I have a data called D consisting of three column
D =
1 2 4
7 9 0
6 8 9
2 9 0
7 6 5
I want to get the minimun number of each rows
for instance the answer for above D will give
1
0
6
0
5
The code must be able to n number of rows
Thanks in advance
Tino
댓글 수: 0
채택된 답변
KALYAN ACHARJYA
2019년 5월 30일
편집: KALYAN ACHARJYA
2019년 5월 30일
mat1=sort(D')
result=mat1(1,:)';
Output
result =
1
0
6
0
5
There is more smart way please check this function also
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!