how to normalize data between 0 and 1 , each column?

2 visualizaciones (últimos 30 días)
helia mb
helia mb el 17 de Ag. de 2016
Editada: helia mb el 17 de Ag. de 2016
i have data that has 13 column and 194 row. i want to normalize each column between 0 and 1 and i want to use min_max method. what should i do? i don't know matlab a lot. plz help me. thank you.

Respuesta aceptada

Stephen23
Stephen23 el 17 de Ag. de 2016
Editada: Stephen23 el 17 de Ag. de 2016
This will normalize each column (assuming no NaN, Inf, or complex):
x = [min(a,[],1);max(a,[],1)]
b = bsxfun(@minus,a,x(1,:));
b = bsxfun(@rdivide,b,diff(x,1,1))
  6 comentarios
helia mb
helia mb el 17 de Ag. de 2016
i really appreciate.....thank you :)))
helia mb
helia mb el 17 de Ag. de 2016
i want to use this new normalize data again. what ever thank you

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical 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!

Translated by