How can normalize matrix in range [-1,1]?
이전 댓글 표시
the matrix have dimension 8192*51975 contains positive and negative values
채택된 답변
추가 답변 (1개)
To normalize between the limits [r0,r1] i.e [-1,1]. Do the following:
r0 = -1 ; r1 = +1 ; % First normalize to [0 ,1] a = rand(10,1) ; range = max(a) - min(a); a = (a - min(a)) / range; % Then scale to [-1,1] range2 = r1-r0; a = (a * range2) + r0;
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!