📄 timestodelays.m
字号:
function [m1,m2,d] = timesToDelays(h, t)%timeToDelays Turn arrival times into inter-phone delays.%% [m1,m2,delays] = timesToDelays(phoneNumbers, arrivalTimes)% The arrival times should be in seconds. So are the delays.% phoneNumbers is used to index into arrivalTimes; it's normally% 1:(number of phones). The phone number pairs are also put% into the m1 and m2 output arrays.%% If arrivalTimes is missing, only m1 and m2 are computed.n = 1; % time-delay numberfor i = 1 : length(h) for j = i+1 : length(h) m1(n) = h(i); m2(n) = h(j); n = n + 1; endendif (nargin > 1) d = -(t(m1) - t(m2));end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -