Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

loop vectorization for below code

1 Ansicht (letzte 30 Tage)
vivek
vivek am 19 Nov. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 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

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by