The function without if statement

How to vectorize this function with if statement
Number = 100
VectorIm = zeros(5000, Number); %%% initialise VectorIm with 5000 and 100
i = 1; %%% counter of column
%%% Values - distance between VectorIm image and ManyVecImage image (float value)

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2020 年 11 月 17 日

0 投票

That should to be the same as:
VectorIm = ManyVecImage(:,Values < 10000);
HTH

この質問は閉じられています。

製品

リリース

R2018a

タグ

質問済み:

2020 年 11 月 17 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by