How to normalize data between 0 and 1
197 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone, i hope you are doing well.
I have the following data.
I want to normalize the data between 0 and 1
How can i do that
0 件のコメント
回答 (2 件)
Davide Masiello
2022 年 3 月 3 日
Given the matrix A that you want to normalise, you could write
A = A/max(A(:));
1 件のコメント
Image Analyst
2022 年 3 月 3 日
He wants the output to go between 0 and 1. Your code will not put the min at 0 unless it is already 0. The easiest solution is to just use
A = rescale(A, 0, 1);
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!