findfirst

MEX file for finding first or last non-zero.
1.6K 次下载
更新时间 2009/6/18

查看许可证

[VALUE,INDEX] = FINDFIRST(A,SEARCHDIR)
Returns the value and optionally index of the first non-zero in A.
A must be full and double
If SEARCHDIR = 'first' (default) the search is from the first index
If SEARCHDIR = 'last', the search is backwards from the last index

This is a cmex file, and is an order of magnitude faster than using FIND, and two orders of magnitude faster than using MATLAB loops.

Tested on Windows NT/2000 VC 6.0, Linux (gcc 2.95) and Solaris (courtesy A Pearson)

引用格式

Richard Hindmarsh (2024). findfirst (https://www.mathworks.com/matlabcentral/fileexchange/2631-findfirst), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Changed to BSD license

1.0.0.0