How to normalize a column vector in [-1 1]?
이전 댓글 표시
Hi, I have a column vector and I want to normalize this column in [-1 1]. Could someone write MATLAB code to do it? Thanks in advance.
답변 (1개)
Star Strider
2014년 5월 31일
편집: Star Strider
2014년 5월 31일
This works:
v = rand(10,1) % Original vector
vx = v*2/(max(v)-min(v));
vn = vx-(min(vx)+1) % Normalised vector
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!