timestodelays.m
来自「基于声源的方向定位程序」· M 代码 · 共 24 行
M
24 行
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 + =
减小字号Ctrl + -
显示快捷键?