Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Parthu P
Parthu P le 28 Oct 2019
Commenté : Parthu P le 28 Oct 2019
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!

Réponse acceptée

Fabio Freschi
Fabio Freschi le 28 Oct 2019
The function min will do this for you
[B,C] = min(A,[],1);

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by