Normalizing to the maximum value
21 次查看(过去 30 天)
显示 更早的评论
I have a 48X128 matrix. I want to normalize each row to the maximum value in that row. What function will achieve this?
0 个评论
回答(1 个)
Sulaymon Eshkabilov
2023-2-3
编辑:Sulaymon Eshkabilov
2023-2-3
Use normalize() to normalize each row or use simple matrix operation to obtain the values of matrix elements to be between [0 .. 1]:
A = randi(10, 7 , 5) % Data
An = normalize(A,2) % Normalize each row
ANor = A./max(A(1:end,:)) % Normalize wi.r.t. max value of each row
1 个评论
Star Strider
2023-2-3
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!