📄 filedelays.m
字号:
% This script loads data from files, if the files haven't been read yet.% If the files have been read, it does not re-read them, since loadascii is% so slow. 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])% delayfile file name of file with time delays between pairs of phones,% with columns of% phoneNumber1 phoneNumber2 delayBetween1and2% The delay should be measured in seconds; see enterDelays% for the sign convention.%% After execution, these are set:%% arr the array% delays time delays between phones; see enterDelays.m for the sign% convention% m1, m2 column vectors, with one row for each time delay, telling% which two phones the delays are measured between;% m1 is for phone1 and m2 for phone2if (~exist('prevarrfile')), prevarrfile = ''; endif (~exist('prevdelayfile')), prevdelayfile = ''; endif (~exist('arrcols')), arrcols = [1 2]; enddisp(sprintf('Time delays are from %s.', delayfile));if (~strcmp(delayfile, prevdelayfile)) disp('Loading...'); delays = loadascii(delayfile); m1 = delays(:,1).'; m2 = delays(:,2).'; delays = delays(:,3).'; prevdelayfile = delayfile;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;end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -