⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 locatetimes.m

📁 基于声源的方向定位程序
💻 M
字号:
% This script runs Steve Mitchell's locator, using a given array% and the arrival times of sounds at the phones in this array.% Upon entry, you need these variables defined:%%    arr        phone positions (2xN array; meters)%    arrivals   arrival times of the sound at each phone (seconds)%    p          (optional) which phones (from arr and arrivals) to use%    c          speed of sound (m/s)%    limits     (optional) display limits of plot [minX maxX minY maxY]%    resolution (optional) grid size for finding best-fit loc (m)%    tolerance  (optional) time-of-arrival error allowed (s) (used in plotting)%% This routine displays the phones, plots the hyperbolas, calculates the% best location, and prints and plots it.  It also sets these variables:%%    xopt       optimal X-Y position (m)%    actual     actual arrival-time differences%    calc       arrival-time differences for optimal position%    err        difference between actual and calc%    m          squared error%    sigma      mean errorif (~exist('limits')), limits = []; endif (~exist('tolerance')), tolerance = []; endif (~exist('resolution')), resolution = []; endif (~exist('p')), p = []; endif (~isempty(p)), p1 = p;else p1 = 1 : size(arr,2); endplotPhones(arr(:,p1), limits);                   % turns hold on[m1,m2,d] = timesToDelays(p1, arrivals);useful = PlotHyperbolas(d, tolerance, arr, m1, m2, c, limits);disp('Finding loc...');[xopt,actual,calc,err,m] = bestFit(m1(useful), m2(useful), d(useful), ...    arr, limits, resolution, c);sigma = showResults(xopt, m1(useful), m2(useful), actual, calc, err, m, c);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -