Normalization of a vector
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Guido Pastore
am 18 Mär. 2019
Kommentiert: Stephan
am 18 Mär. 2019
How do I normalize an array of double from -1 and +1?
0 Kommentare
Akzeptierte Antwort
Stephan
am 18 Mär. 2019
Bearbeitet: Stephan
am 18 Mär. 2019
result = normalize(v,'range',[-1 1])
where v is your vector
2 Kommentare
Stephan
am 18 Mär. 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Elementary Math finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!