Hi
Can someone tell me what does normc function do? Well ... it normalizes data in each column but to what range ([0,1]?) ? I read the description but I can't fully understand.
Thanks.

 採用された回答

Star Strider
Star Strider 2014 年 12 月 10 日

3 投票

It normalises the sum of the squares of the elements in each column to have a value of 1.
To illustrate:
M = randi(20,5,5); % Create Random Matrix
Mnc = normc(M); % Call ‘normc’
Ssq = sum(Mnc.^2); % Column Sum-Of-Squares

4 件のコメント

Insos
Insos 2014 年 12 月 10 日
Do you know the math behind the function?
Star Strider
Star Strider 2014 年 12 月 11 日
It’s fairly short. Type:
type normc.m
in the Command Window to see how it works. (It’s copyrighted, so I can’t copy and post it here.)
Insos
Insos 2014 年 12 月 11 日
One last question ... is there any advantage of doing normalization with normc instead of normalizing data between [0,1] with the min and max value?
Star Strider
Star Strider 2014 年 12 月 11 日
There is, because normc retains the relative magnitudes of the data in each column with respect to the length of the vector they describe. Normalising between min and max destroys those relationships.
How you normalise them depends on what you want to do with your data, but if your data span a vector space and you want to preserve the relationships between the vector components, normc (or normr) are your only options.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2014 年 12 月 10 日

コメント済み:

2014 年 12 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by