Normalizing data?

I need to make data in one column of an array to be normalized to be in between 0.0 and 1.0. How do I go about doing that? Sorry if this is trivial but I couldn't find anything on it.
Thank you.

回答 (1 件)

Jan
Jan 2011 年 12 月 1 日

0 投票

i = 4;
B = A;
minC = min(A(:, i));
maxC = max(A(:, i));
B(:, i) = (B(:, i) - minC) /(maxC - minC);

カテゴリ

ヘルプ センター および File ExchangeLanguage Fundamentals についてさらに検索

タグ

質問済み:

2011 年 12 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by