normalize a row vector
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Elysi Cochin
le 3 Mar 2014
Réponse apportée : Giorgos Papakonstantinou
le 3 Mar 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 commentaires
Réponse acceptée
Plus de réponses (1)
Giorgos Papakonstantinou
le 3 Mar 2014
If I understood correctly:
A=1:128;
B=A/sum(A);
Then:
sum(B)
ans =
1
0 commentaires
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!