Normalization of a vector
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I normalize an array of double from -1 and +1?
0 commentaires
Réponse acceptée
Stephan
le 18 Mar 2019
Modifié(e) : Stephan
le 18 Mar 2019
result = normalize(v,'range',[-1 1])
where v is your vector
2 commentaires
Stephan
le 18 Mar 2019
you may also be interested in:
v = [-2 -1 0; 0.5 1.5 2; 0 2 -1]
result = rescale(v,-1, 1)
which works for arrays. Compare the results of both approaches and choose the option that meets your needs.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Elementary Math 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!