What type of search Find function provide ?

1 回表示 (過去 30 日間)
Sososasa
Sososasa 2014 年 4 月 9 日
回答済み: Jan 2014 年 4 月 10 日
Hi,
What type of search a find function provide ? is it a binary search ?
  1 件のコメント
dpb
dpb 2014 年 4 月 9 日
Undocumented but since it returns a vector dependent on the inputs, unlikely it's other than just linear (in traversing memory) would be my guess. It's not looking for something in an ordered list or the like where a binary search would help.

サインインしてコメントする。

採用された回答

Jan
Jan 2014 年 4 月 10 日
The timings imply that it is a linear search. I did not find an evidence that it is multi-threaded, but I'd expect it to be.
As dpb said already, a binary search would be useful only if the input is sorted. The undocumented functions ismembc and ismembc2 perform a binary search.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by