normalize a row vector
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Elysi Cochin
am 3 Mär. 2014
Beantwortet: Giorgos Papakonstantinou
am 3 Mär. 2014
i have a vector of size A = 1*128.... i wanted to normalize the vector to B, such that when i sum the new matrix B, i get its sum of all column values as 1....
is there any method to do it?... please do reply....
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Giorgos Papakonstantinou
am 3 Mär. 2014
If I understood correctly:
A=1:128;
B=A/sum(A);
Then:
sum(B)
ans =
1
0 Kommentare
Siehe auch
Kategorien
Mehr zu Dynamic System Models finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!