How to normalize given matrix in the range of [-11] ?

%# Decide the labels and normalize instance matrix into range [1, -1] [train_inp avgMatrix mRows mCols] = getNormalMatrix('SVMDATA2.xlsx','Oct','A1:C1464');

回答 (1 件)

Iman Ansari
Iman Ansari 2013 年 4 月 27 日

0 投票

Hi.
A=randi(100,[10 10 10]);
% Between [0 1]
A=(A-min(A(:)))./(max(A(:))-min(A(:)));
A=2.*A -1;

1 件のコメント

Kunal yawle
Kunal yawle 2013 年 4 月 29 日
thank you very much.... the code works..!!!

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

カテゴリ

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

製品

質問済み:

2013 年 4 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by