surrocallfunction.m

来自「替代数据方法(基于相位随机化方法)」· M 代码 · 共 24 行

M
24
字号
    clear all;
    close all;
%% open data file
    s='E:\data\GEZ\TESTAZ\TESTAZ6.000';
    fid=fopen(s,'r');                                  %file path
    xdata=fread(fid,'float32');                        %read data from file
    fclose(fid);                                       %close file
    clear fid;
    Filelength = length(xdata);                        % the length of
    %xdata
    MT1=400;                                          % the number of total sections
%     startp=3080000-2390000;                            % start point of running
%     endp=3080000;                                      % end point of running
startp =  1 ;
endp = Filelength;
    Seclength1=floor((endp-startp)/MT1);               % the number of ponits in every section
    surr(1,MT1)=0;
for countk = 1:1:MT1
    Zn = xdata(startp+(countk-1)*Seclength1:startp+countk*Seclength1)';
    surr(1,countk) =  SurrogateData(Zn);
end;                                                   % end of for loop
    figure(1);
    countt = 1:1:MT1;
    plot(countt,surr);

⌨️ 快捷键说明

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