min/max finding

26 vues (au cours des 30 derniers jours)
Josiah Bloom
Josiah Bloom le 14 Avr 2022
Commenté : Josiah Bloom le 14 Avr 2022
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!

Réponses (1)

David Hill
David Hill le 14 Avr 2022
a=randi(10000,24,60);
Min=min(a,[],2);
Max=max(a,[],2);
  1 commentaire
Josiah Bloom
Josiah Bloom le 14 Avr 2022
thank you!

Connectez-vous pour commenter.

Catégories

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

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by