How can I scales the entries of an array to the interval [0,1] in matlab version 2014a?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
How can I scales the entries of an array to the interval [0,1] in matlab version 2014a? The rescale function in matlab 2014a is not working for this purpose.
0 comentarios
Respuestas (2)
DGM
el 23 de Mayo de 2021
Something like this:
A = rand(5)*10-4 % some random test array
mn = min(A(:));
mx = max(A(:));
B = (A - mn) ./ (mx-mn)
That will scale the data such that its extrema correspond to [0 1]
0 comentarios
Ver también
Categorías
Más información sobre Grid Lines, Tick Values, and Labels 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!