Normalization of a vector
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Guido Pastore
el 18 de Mzo. de 2019
Comentada: Stephan
el 18 de Mzo. de 2019
How do I normalize an array of double from -1 and +1?
0 comentarios
Respuesta aceptada
Stephan
el 18 de Mzo. de 2019
Editada: Stephan
el 18 de Mzo. de 2019
result = normalize(v,'range',[-1 1])
where v is your vector
2 comentarios
Stephan
el 18 de Mzo. de 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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Elementary Math en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!