📄 select_records.m
字号:
function result = select_records(data, condition)if( nargin!=2 ) usage("select_records(data, condition)")endifj=1;for i=1:size(data,1) # for each data row, see if the condition is true datarow=data(i,:); if( eval(condition) ) # if so, copy it to the top of the list of rows we keep data(j,:) = data(i,:); j=j+1; endifendforresult=data(1:j-1,:);endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -