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

11 次查看(过去 30 天)
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!

采纳的回答

Bruno Luong
Bruno Luong 2019-8-19
Assuming they are the same size
min(A,B)

更多回答(1 个)

Steven Lord
Steven Lord 2019-8-19
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."

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by