can you help me to vectorize this for loop
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
final_y = gpuArray(fft_frame.*y2.*y3.*y4);
final_y(1,:) = []; % eliminating first energy row
loc =zeros(3,no_frame);
val = zeros(3,no_frame);
final_y=gather(final_y);
for i = 1:no_frame
[loc(:,i),val(:,i)] = pickpeak(final_y(:,i),3,1); % Top 3 peaks
end
1 commentaire
Jan
le 31 Jan 2018
As long, as you do not mention, what the function pickpeak does, there is no chance to predict, if the function can be vectorized. It does not belong to Matlab's toolboxes, so it would be useful, if you mention, where you did get it from.
Réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!