How can solve the problem? please!

조회 수: 2 (최근 30일)
abduall hassn
abduall hassn 2016년 8월 27일
편집: abduall hassn 2016년 11월 3일
p=[148
249
357
547
854
1
1184
996
966
679
586
503
281
1
110
89
58
68
28
19
16
6
13
7
4
2
1
12]
this equation
and this code
xn = zeros(size(p))
mx=max (p(2));
mn=min (p(1));
mmd=mx-mn;
for i=1:(P,1)
xn(i,:)=(p(i,:)-mn)./(mmd)*(mx-mn)+mn
end
p is data for normalization
I applied min and max equation that is mention above.
When I applied the code the output wrong, please can you tell where the wrong in the code
  댓글 수: 3
abduall hassn
abduall hassn 2016년 8월 27일
I found the proper equation for max and min normalization
- The previous one the normalization is default between [o,1]. But, in this we select and values as mention in equation *(mx-mn)+mn
Walter Roberson
Walter Roberson 2016년 8월 27일
Is the previous question solved relative to what you asked there? If so then you should Accept one of the solutions. But if what you were wanting was just to correct the question, then you should have edited that one instead of starting a new question.

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

채택된 답변

Pawel Ladosz
Pawel Ladosz 2016년 8월 27일
편집: Pawel Ladosz 2016년 8월 27일
Hi Abudlla,
It appears the mistake is in:
(mx-mn)+mn
this line should be (new_max_a-new_min_a)+new_min_a and in your code it is: (max_a+min_a)+min_a.
In other words you are lacking variables for new_max_a and new_min_a.
  댓글 수: 2
abduall hassn
abduall hassn 2016년 8월 27일
Dear this variable we can write new _max and new_min or min and max
I am asking the code dosn't display the output properly
abduall hassn
abduall hassn 2016년 8월 27일
I got the error, the error was xn(i,:) and as mention dear Pawel Ladosz

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

추가 답변 (0개)

카테고리

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

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by