How to find corresponding row positions of specific values in a matrix?

조회 수: 2 (최근 30일)
Parthu P
Parthu P 2019년 10월 28일
댓글: Parthu P 2019년 10월 28일
Hi,
I have matrix A (365x42) with mean daily temperature for 42 years and matrix B (1x42) with lowest daily temperature in each year derived from matrix A using B = min(A).
I want another matrix C (1x42) with corresponding row positions (in each column of matrix A) of values in matrix B.
Thank you!

채택된 답변

Fabio Freschi
Fabio Freschi 2019년 10월 28일
The function min will do this for you
[B,C] = min(A,[],1);

추가 답변 (0개)

카테고리

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