필터 지우기
필터 지우기

How to normalize data ?

조회 수: 3 (최근 30일)
Oman Wisni
Oman Wisni 2018년 12월 16일
댓글: Oman Wisni 2018년 12월 16일
Hi, I have data with dimension 1x25, where
x = rand(1,25);
D = size(x,2);
I'm trying using this code, but the result is NaN. Please help me, to fix my code. Thanks
for col = 1: D
x(:,col)=double(x(:,col)-mean(x(:,col)));
end
for col = 1: D
x(:,col)=double(x(:,col)/std(x(:,col)));
end

채택된 답변

Stephan
Stephan 2018년 12월 16일
x = rand(1,25);
x = (x-mean(x))/std(x)
  댓글 수: 3
Stephan
Stephan 2018년 12월 16일
편집: Stephan 2018년 12월 16일
Which Matlab release do you use? In 2018b the result is a 220x1 vector.
Oman Wisni
Oman Wisni 2018년 12월 16일
I used matlab R2015a

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by