usun_czas.m

来自「good for who wants it」· M 代码 · 共 19 行

M
19
字号
function usun_czas(fid,katalog)
% trgraph
% removes lines form file which are outside time interval [TSTART, TEND]
global TSTART TEND

l=fgets(fid);
fidw=fopen(strcat(katalog,'temp'), 'wb');
sp=findstr(l, 32);
t=str2double(l(sp(1):sp(2)));
while t<=TEND & l~=-1
    sp=findstr(l, 32);
    t=str2double(l(sp(1):sp(2)));
    if t>=TSTART & t<=TEND
        fwrite(fidw, l, 'char');
    end
    l=fgets(fid);
end
fclose(fidw);
fclose(fid);

⌨️ 快捷键说明

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