MATLAB Answers

Kunal yawle

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

Asked by Kunal yawle
on 27 Apr 2013

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


1 Answer

Answer by Iman Ansari
on 27 Apr 2013


A=randi(100,[10 10 10]);
% Between [0 1]
A=2.*A -1;

  1 Comment

thank you very much.... the code works..!!!

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!