MATLAB Answers

matrix normalization in matlab

200 views (last 30 days)
jenifer on 30 Jan 2013
Commented: moahaimen talib on 6 Jan 2017
hi.. i want normalize a matrix (129 x 128)..please help me with matlab codes

Accepted Answer

Thorsten on 30 Jan 2013
To normalize a matrix such that all values fall in the range [0, 1] use
Anorm = (A - min2(A))/(max2(A) - min2(A));
  1 Comment
moahaimen talib
moahaimen talib on 6 Jan 2017
*how can i normalize the dwt2 coefficients *

Sign in to comment.

More Answers (2)

Matt J
Matt J 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(:)))
Jan on 30 Jan 2013
Please, jenifer, we have asked you to define "normalization" exactly. It wastes time if we guess what you mean.

Sign in to comment.

Jing 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.

Community Treasure Hunt

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

Start Hunting!