Normalizing to the maximum value
50 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a 48X128 matrix. I want to normalize each row to the maximum value in that row. What function will achieve this?
0 commentaires
Réponses (1)
Sulaymon Eshkabilov
le 3 Fév 2023
Modifié(e) : Sulaymon Eshkabilov
le 3 Fév 2023
Use normalize() to normalize each row or use simple matrix operation to obtain the values of matrix elements to be between [0 .. 1]:
A = randi(10, 7 , 5) % Data
An = normalize(A,2) % Normalize each row
ANor = A./max(A(1:end,:)) % Normalize wi.r.t. max value of each row
1 commentaire
Star Strider
le 3 Fév 2023
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!