📄 testset.m,v
字号:
head 3.0;access;symbols;locks; strict;comment @// @;3.0date 2000.06.13.19.18.07; author gilles; state Exp;branches;next ;desc@Release 3@3.0log@*** empty log message ***@text@function [matfile]=testset(datain,nsamples);%function [matfile]=testset(datain,nsamples);%% This function takes a representative sample of traces from DATAIN.% NSAMPLES specifies how many traces are to be taken from datain, it% should have a value of at least 3.% The extracted sample traces are equally spaced.% The code can probably be simplified (but it doesn't have to be!).% % R.Zschuppe, July 1999ntraces=datain.fh{13};nrecords=datain.fh{12};% Initialize File Header:matfile.fh=datain.fh;matfile.fh{1}=(nsamples*nrecords); % Number of traces contained in filematfile.fh{13}=nsamples; % Maximum record foldfor rec=1:nrecords % Initialize first trace in the dataset: matfile.th{rec}(:,1)=datain.th{rec}(:,1); % matfile.th{rec}(12,1)=nsamples; matfile.th{rec}(13,1)=1; matfile.dat{rec}(:,1)=datain.dat{rec}(:,1); % Initialize traces in between first and last trace for ii=2:(nsamples-1) count=(round(ntraces/nsamples))*(ii-1); matfile.th{rec}(:,ii)=datain.th{rec}(:,count); matfile.th{rec}(12,ii)=nsamples; matfile.th{rec}(13,ii)=count; matfile.dat{rec}(:,ii)=datain.dat{rec}(:,count); end % Initialize last trace in the dataset: matfile.th{rec}(:,nsamples)=datain.th{rec}(:,ntraces); matfile.th{rec}(12,nsamples)=nsamples; matfile.th{rec}(13,nsamples)=nsamples; matfile.dat{rec}(:,nsamples)=datain.dat{rec}(:,ntraces);end@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -