dist_t.m
资源名称:TOA_uwb.rar [点击查看]
上传用户:doryuen
上传日期:2013-10-30
资源大小:23k
文件大小:0k
源码类别:
通讯/手机编程
开发平台:
Matlab
- function distn = dist_t(x,y)
- % This function calculates distance between two points
- % x and y is a 1 by 2 matrix which containes coordinates of two points
- % Example: x (12, 26), y (5, 0);
- distn = sqrt((x(1) - y(1))^2 + (x(2) - y(2))^2);