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

10 vues (au cours des 30 derniers jours)
thoraya
thoraya le 16 Nov 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

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 16 Nov 2013
Modifié(e) : Azzi Abdelmalek le 16 Nov 2013
a=10;
b=20;
v=rand(1,10)*5+1
n_data = a+(b-a)*(v-min(v))/( max(v)-min(v))

Catégories

En savoir plus sur Physics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by