How to normalize a column vector in [-1 1]?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 31 Mag 2014
Modificato: Star Strider
il 31 Mag 2014
This works:
v = rand(10,1) % Original vector
vx = v*2/(max(v)-min(v));
vn = vx-(min(vx)+1) % Normalised vector
0 Commenti
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!