can you help me to vectorize this for loop
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Jan
el 31 de En. de 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.
Respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!