MATLAB Answers

Inf or NaN vaiues normalize into [0 1]

4 views (last 30 days)
JunGi Kim
JunGi Kim on 19 Mar 2020
Commented: JunGi Kim on 20 Mar 2020
Hi, I'm trying to normalize into [0 1].
Could you help me?
I want to normalize two variables. W_1 and W_2
X = [Xmin ~ Xmax],
D = [1 ~ 6]
First, I try to find maximum & minimum values of these W.
But, Because of (Xmax-Xmax) form, W2 has Inf Value.
Do you have any Idea to normalize?

  0 Comments

Sign in to comment.

Answers (1)

KSSV
KSSV on 19 Mar 2020
use
xnew = (x-xmin)/(xmax-xmin)

  3 Comments

JunGi Kim
JunGi Kim on 20 Mar 2020
Then value W2_max has
6 / 0 shape!!
KSSV
KSSV on 20 Mar 2020
why? Is your xmin and xmax are same? all zeros?
JunGi Kim
JunGi Kim on 20 Mar 2020
And, I want to find
As I think, denominator should be min, numerator should be max.
Then D = 6, X = Xmax...
Is it wrong?

Sign in to comment.

Sign in to answer this question.