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 CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by