computing minimum for each rows

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

 採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 5 月 30 日
編集済み: KALYAN ACHARJYA 2019 年 5 月 30 日

1 投票

mat1=sort(D')
result=mat1(1,:)';
Output
result =
1
0
6
0
5
There is more smart way please check this function also

1 件のコメント

Tino
Tino 2019 年 5 月 30 日
Thanks Kalyan

サインインしてコメントする。

その他の回答 (0 件)

製品

リリース

R2019a

タグ

質問済み:

2019 年 5 月 30 日

コメント済み:

2019 年 5 月 30 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by