How to solve this problem?

3 vues (au cours des 30 derniers jours)
Aanqq
Aanqq le 14 Déc 2020
Commenté : Aanqq le 14 Déc 2020
normalize the data X by subtracting the minimum value and dividing by the range over each dimension?

Réponses (2)

KALYAN ACHARJYA
KALYAN ACHARJYA le 14 Déc 2020
This?
data=rand(1,10); %Exampe data
min_val=min(data);
max_val=max(data);
norm_data=(data-min_val)/(max_val-min_val)
  1 commentaire
Aanqq
Aanqq le 14 Déc 2020
Thanks

Connectez-vous pour commenter.


Ameer Hamza
Ameer Hamza le 14 Déc 2020
You can use rescale(): https://www.mathworks.com/help/matlab/ref/rescale.html to get the values in a range you want. For example,
X_new = rescale(X, 0, 1)
  1 commentaire
Aanqq
Aanqq le 14 Déc 2020
Thanks

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by