How to normalize a column vector in [-1 1]?
1 回表示 (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!