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

📄 locatedelays.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        [2xN] phone positions (m)%    delays     [1xM] delay times of the sound between pairs of phones (s)%    m1, m2	[1xM] between which phones was the delay measured?%    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 = []; endplotPhones(arr, limits);                   % turns hold onuseful = PlotHyperbolas(delays, tolerance, arr, m1, m2, c, limits);disp('Finding loc...');[xopt,actual,calc,err,m] = bestFit(m1(useful), m2(useful), delays(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 + -