min/max finding

조회 수: 31 (최근 30일)
Josiah Bloom
Josiah Bloom 2022년 4월 14일
댓글: Josiah Bloom 2022년 4월 14일
I have a 24x60 matrix and I want to find the min and max for each row. i want the ouput to be a 1x24 matrix of the maximums and a different 1x24 matrix for the miniums. Thank you!

답변 (1개)

David Hill
David Hill 2022년 4월 14일
a=randi(10000,24,60);
Min=min(a,[],2);
Max=max(a,[],2);
  댓글 수: 1
Josiah Bloom
Josiah Bloom 2022년 4월 14일
thank you!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by