📄 distfn_circle2d.m
字号:
%------------------------------------------------------------------------
% Function to calculate distances between a 2d line and an array of points.
function [dist, P] = distfn_circle2d(P, X)
[d npts] = size(X);
dist = zeros(npts,1);
for i = 1:npts
dist(i) = abs(norm([P(1);P(2)]-X(:,i))-P(3));
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -