필터 지우기
필터 지우기

Vectorise or make this code run faster

조회 수: 2 (최근 30일)
Dan Page
Dan Page 2018년 11월 17일
답변: Guillaume 2018년 11월 17일
How would I make this code run faster:
for i=1:nRows
for j=1:nCols
Z=I(i,j,1)-I(i,j,2)-I(i,j,3);
end
end
Thank you

답변 (1개)

Guillaume
Guillaume 2018년 11월 17일
This is really basic matlab
Z = I(:, :, 1) - I(:, :, 2) - I(:, :, 3);

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by