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

5 ビュー (過去 30 日間)
Daniel Tanner
Daniel Tanner 2019 年 8 月 19 日
回答済み: Steven Lord 2019 年 8 月 19 日
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 Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by