Minimum value of row

12 Ansichten (letzte 30 Tage)
Nabanita
Nabanita am 13 Okt. 2012
I have an matrix of size 128X12. For each row I want to find the minimum value and also the row number and column number where that particular minimum value occurs.

Akzeptierte Antwort

Matt Fig
Matt Fig am 13 Okt. 2012
Bearbeitet: Matt Fig am 13 Okt. 2012
A = magic(6); % Given array.
[MN,I] = min(A,[],2) % Minimum of each row, and index
Also, whenever you have a question like this, you should turn to the MATLAB documentation. For example, you know you want to find the minimum, so do this:
docsearch('minimum')

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by