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 日
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!