How to normalize the values of matrix to make it greater than zero and less than one?
7 views (last 30 days)
Show older comments
hello,
ho to normalize the values of a matrix to make it greater than zero and less than one?
regards,
2 Comments
Accepted Answer
Matt J
on 23 Oct 2018
Edited: Matt J
on 23 Oct 2018
B=(A-min(A(:)))/(max(A(:))-min(A(:))) ;
4 Comments
Walter Roberson
on 23 Oct 2018
delta = max(eps(A(:));
B=(A-min(A(:))+delta)/(max(A(:))-min(A(:))+delta) ;
More Answers (3)
madhan ravi
on 23 Oct 2018
Edited: madhan ravi
on 23 Oct 2018
Try :
Np = normalize(A,'norm',1) % A your matrix
1 Comment
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!