📄 findfirst.m
字号:
function[a]=findfirst(bool)%FINDFIRST Finds the first incidence of X==1; returns LENGTH(X) if all false.% _________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information % (C) 2002, 2004 J.M. Lilly --- type 'help jlab_license' for details if isempty(bool) error('Argument cannot be empty');endtemp=find(bool);if ~isempty(temp) a=min(temp);else a=length(bool);end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -