Compare values in a matrix and keep the lowest number in each element?

5 Ansichten (letzte 30 Tage)
Hi,
I have two matrices of fairly similar values per element. I would like to create a new third matrix which takes the lowest number in each element?
Any help would be greatly appreciated!

Akzeptierte Antwort

Bruno Luong
Bruno Luong am 19 Aug. 2019
Assuming they are the same size
min(A,B)

Weitere Antworten (1)

Steven Lord
Steven Lord am 19 Aug. 2019
Call min with the two matrices as input. From the documentation: "C = min(A,B) returns an array with the smallest elements taken from A or B."

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by