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

New to MATLAB?

matrix normalization in matlab

Asked by jenifer

jenifer (view profile)

on 30 Jan 2013

hi.. i want normalize a matrix (129 x 128)..please help me with matlab codes

0 Comments

jenifer

jenifer (view profile)

Products

No products are associated with this question.

3 Answers

Answer by Thorsten

Thorsten (view profile)

on 30 Jan 2013
Accepted answer

To normalize a matrix such that all values fall in the range [0, 1] use

Anorm = (A - min2(A))/(max2(A) - min2(A));

0 Comments

Thorsten

Thorsten (view profile)

Answer by Jing

Jing (view profile)

on 30 Jan 2013

You can use 'normc' or 'normr' for normalization. 'c' or 'r' stands for columns or rows that you want to normalize.

0 Comments

Jing

Jing (view profile)

Answer by Matt J

Matt J (view profile)

on 30 Jan 2013

You need to decide how you want to define the amplitude of the matrix first. Maybe you want this

 normalized = A/norm(A);

or maybe this

 normalized = A/max(abs(A(:)))

3 Comments

Jan Simon

Jan Simon (view profile)

on 30 Jan 2013

Or perhaps "normalization" means a range of [0,1]?

jenifer

jenifer (view profile)

on 30 Jan 2013

ya... but how can i get a single value from whole matrix...

Jan Simon

Jan Simon (view profile)

on 30 Jan 2013

Please, jenifer, we have asked you to define "normalization" exactly. It wastes time if we guess what you mean.

Matt J

Matt J (view profile)

Contact us