findend.m

来自「student teacher and proferssor llove thi」· M 代码 · 共 12 行

M
12
字号
function out=findend(linenum,s,funstr,funstrwords,keywords,keywordsbegin)left=1;right=0;i=linenum+1;while ((left~=right)&(i<=s)) if length(find(strcmpi(funstrwords{i}(1),{'for';'do';'while';'if';'switch'})))==1  left=left+1;  end if length(find(strcmpi(funstrwords{i}(1),'end')))>0, right=right+1; end i=i+1;endout=i-1;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?