Borrar filtros
Borrar filtros

normalize a vector of points belonging to the interval [a,b]

2 visualizaciones (últimos 30 días)
thoraya
thoraya el 16 de Nov. de 2013
Editada: Azzi Abdelmalek el 16 de Nov. de 2013
Hi, given an interval [a,b] where a and b can take either positive or negative value. how can i normalize a vector of points belonging to the interval [a,b]. Thanks

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 16 de Nov. de 2013
Editada: Azzi Abdelmalek el 16 de Nov. de 2013
a=10;
b=20;
v=rand(1,10)*5+1
n_data = a+(b-a)*(v-min(v))/( max(v)-min(v))

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by