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

조회 수: 12 (최근 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