フィルターのクリア

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 Center および File ExchangeLoops 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