📄 filetimes.m
字号:
% This script loads data from files, if the files haven't been read yet.% On input, these variables must be set:%% arrfile file name of array phone positions; positions should be % in columns of x and y% arrcols which columns of arrfile to use (normally just [1 2])% timefile arrival times at each phone (s)% p phones to use%% After execution, these are set:%% arr the array% arrivals times of arrivalif (~exist('prevarrfile')), prevarrfile = ''; endif (~exist('prevtimefile')), prevtimefile = ''; enddisp(sprintf('Arrival times are from %s.', timefile));if (~strcmp(timefile, prevtimefile)) disp('Loading...'); arrivals = loadascii(timefile); prevtimefile = timefile;enddisp(sprintf('Array positions are from %s.', arrfile));if (~strcmp(arrfile, prevarrfile)) disp('Loading...'); arr = loadascii(arrfile); arr = arr(:, arrcols).'; % pick off desired columns if (size(arr,1) < 2), arr(2,1) = 0; end % change 1-dim array to 2-dim prevarrfile = arrfile;endif (~strcmp(p, 1:length(arr))) % not strings, but strcmp still works disp(sprintf('Using phones [%d%s] from this array.', ... p(1), sprintf(' %d',p(2:length(p)))));end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -