测试

测试

clc;
clear;

M2=[];
TIME2={};
%fid = fopen('2020-12-27-16-19-52.txt');
%fid = fopen('2020-12-17-09-21-11-1.txt');
%fid = fopen('2020-12-17-09-21-11-2.txt');
%fid = fopen('2020-12-27-09-58-36_1.txt');
fid = fopen('L:\\GZY_20210304\\2020-12-26-07-56-14_1\\8.txt');


tline = fgetl(fid);
k=1;
while ischar(tline)
    %disp(tline)
    
    
    S = regexp(tline, '\s+', 'split');
    %disp(S)
    %disp(S(1))
    %M2(k)=str2num(cell2mat(S(2)));
    data_cell=S(1);
    data_cell2=S(2);
    %M2(k)=d1;
    %class(data_cell);
    
    data_double=transpose(str2num(cell2mat(data_cell)));
    %M2(M2,k)=data_double;
    
    %M2=[M2 data_double*0.001];
    %TIME2=[TIME2 data_cell2];
    
    M2(k)=data_double*0.001;
    TIME2(k)=data_cell2;
    
    tline = fgetl(fid);
    
    
    
    
    k=k+1;
end
fclose(fid);



M=M2(1:6000)
TIME=0:length(M)-1;

 

 

 

#########

posted @ 2021-05-13 22:14  西北逍遥  阅读(33)  评论(0编辑  收藏  举报