How to solve this problem?
1 次查看(过去 30 天)
显示 更早的评论
normalize the data X by subtracting the minimum value and dividing by the range over each dimension?
0 个评论
回答(2 个)
KALYAN ACHARJYA
2020-12-14
This?
data=rand(1,10); %Exampe data
min_val=min(data);
max_val=max(data);
norm_data=(data-min_val)/(max_val-min_val)
Ameer Hamza
2020-12-14
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Error Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!