Normalize data set between 0 and 1

조회 수: 3 (최근 30일)
Subhasmita Ghosh
Subhasmita Ghosh 2017년 10월 17일
댓글: Image Analyst 2021년 2월 6일
I have a data set in excel sheet and my task is to normalize these data between 0 and 1 .I 1st try to get max or min value but give me in exponential format although i try format short format long but does not give right value..help me
  댓글 수: 1
Ameetha
Ameetha 2021년 2월 4일
DID YOU GET THE SOLUTION FOR THIS? IF SO PLS GIVE ME THE CODE TO NORMALIZE VALUES BETWEEN O AND 1 after reading from various columns of an excel sheet in matlab

댓글을 달려면 로그인하십시오.

답변 (3개)

Image Analyst
Image Analyst 2017년 10월 17일
If you have the Image Processing Toolbox, you can normalize an array to between 0 and 1 by doing this:
normalizedData = mat2gray(data);

Star Strider
Star Strider 2017년 10월 17일
The format is not important with respect to the calculations. The values you want from your imported Excel data, and the minimum and maximum, retain their full precision regardless of how they are displayed.
If you want to change the Command Window format of your numbers, see the documentation for the format (link) function.

Steven Lord
Steven Lord 2021년 2월 4일
If you're using release R2018a or later, see the normalize function.
  댓글 수: 1
Image Analyst
Image Analyst 2021년 2월 6일
or rescale(). Is one better than the other?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by