How to normalize the values of matrix to make it greater than zero and less than one?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello,
ho to normalize the values of a matrix to make it greater than zero and less than one?
regards,
2 Commenti
Risposta accettata
Matt J
il 23 Ott 2018
Modificato: Matt J
il 23 Ott 2018
B=(A-min(A(:)))/(max(A(:))-min(A(:))) ;
4 Commenti
Walter Roberson
il 23 Ott 2018
delta = max(eps(A(:));
B=(A-min(A(:))+delta)/(max(A(:))-min(A(:))+delta) ;
Più risposte (3)
madhan ravi
il 23 Ott 2018
Modificato: madhan ravi
il 23 Ott 2018
Try :
Np = normalize(A,'norm',1) % A your matrix
1 Commento
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!