how to take vector and norm for indiviual column in the complex matrix
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
VISHALI V
il 30 Gen 2018
Commentato: VISHALI V
il 30 Gen 2018
p=inf;
for k=1:k
gk =G(:,k);
N =norm(gk,p);
vk=gk/N;
end
0 Commenti
Risposta accettata
Andrei Bobrov
il 30 Gen 2018
Modificato: Andrei Bobrov
il 30 Gen 2018
vk = G;
for k=1:size(vk,2)
vk(:,k) =G(:,k)/norm(G(:,k),inf);
end
Più risposte (1)
Torsten
il 30 Gen 2018
Modificato: Torsten
il 30 Gen 2018
1) "for k=1:k" won't work ; you will have to use another variable name for the upper bound of the Loop.
2) You permanently overwrite the vectors vk in the loop. Adding the line Gnorm(:,k)=vk should work.
p=Inf;
for k=1:size(G,2)
gk =G(:,k);
N =norm(gk,p);
vk=gk/N;
Gnorm(:,k)=vk;
end
Best wishes
Torsten.
0 Commenti
Vedere anche
Categorie
Scopri di più su Wireless Communications 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!