Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

loop vectorization for below code

1 view (last 30 days)
vivek
vivek on 19 Nov 2014
Closed: MATLAB Answer Bot on 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

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!