How to normalize the values of matrix to make it greater than zero and less than one?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hello,
ho to normalize the values of a matrix to make it greater than zero and less than one?
regards,
2 commentaires
Réponse acceptée
Matt J
le 23 Oct 2018
Modifié(e) : Matt J
le 23 Oct 2018
B=(A-min(A(:)))/(max(A(:))-min(A(:))) ;
4 commentaires
Walter Roberson
le 23 Oct 2018
delta = max(eps(A(:));
B=(A-min(A(:))+delta)/(max(A(:))-min(A(:))+delta) ;
Plus de réponses (3)
madhan ravi
le 23 Oct 2018
Modifié(e) : madhan ravi
le 23 Oct 2018
Try :
Np = normalize(A,'norm',1) % A your matrix
1 commentaire
Voir également
Catégories
En savoir plus sur Logical 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!