I have a matrix wity dimension 100 by 50. Now i want to normalize the matrix by doing normaization of each column. I want to normlaize each column separately to do normalization

 채택된 답변

Mohammad Sami
Mohammad Sami 2020년 6월 16일

0 개 추천

You can use the function normalize and specify which dimension you want to normalize.
From the documentation
"N = normalize(A) returns the vectorwise z-score of the data in A with center 0 and standard deviation 1.
If A is a vector, then normalize operates on the entire vector.
If A is a matrix, table, or timetable, then normalize operates on each column of data separately.
If A is a multidimensional array, then normalize operates along the first array dimension whose size does not equal 1. "

댓글 수: 5

AS
AS 2020년 6월 16일
I want to normalioze each column by dviding its maximum value and continue for all columns
You can just divide your matrix with the column max in that case.
b = a ./ max(a);
AS
AS 2020년 6월 19일
i have solved it by myself
it will be
b=(a./max(a, [ ] ,1));
madhan ravi
madhan ravi 2020년 6월 19일
It is exactly the same as what Sami suggested.
AS
AS 2020년 6월 19일
편집: AS 2020년 6월 19일
yes.but it would not give me the all normalized columns

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

AS
2020년 6월 16일

편집:

AS
2020년 6월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by