필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

loop vectorization for below code

조회 수: 1 (최근 30일)
vivek
vivek 2014년 11월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
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

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by