Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

loop vectorization for below code

1 visualización (últimos 30 días)
vivek
vivek el 19 de Nov. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi, I was wondering if there is a fast way to vectorize this code.
idx_A=1; idx_B=1; idx_C = 1;
for idx=1:length(temp)
if ~image(x(idx),y(idx))==0
lA(idx_A)= handles.Val(idx);
idx_A=idx_A+1;
end
if handles.Morph.Threshold_MapFrame(x(idx),y(idx))==0.5
lB(idx_B)= handles.Val(idx);
idx_B=idx_B+1;
end
if handles.Morph.Threshold_MapFrame(x(idx),y(idx))>0.5
lC(idx_C)= handles.Val(idx);
idx_C=idx_C+1;
end
end

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by