calcendpoint.m

来自「it is a matlab file foe develop SLAM loc」· M 代码 · 共 18 行

M
18
字号
%CALCENDPOINT Calculate segment endpoints.%   PE = CALCENDPOINT(P,X) returns the Cartesian coordinates of%   the segment endpoint PE = [x; y] by perpendicularly project-%   ing point P = [x; y] onto the alpha,r-line with parameters%   X = [alpha; r].%%   See also EXTRACTLINES.% v.1.0, 08.01.99, Kai Arras, ASL-EPFLfunction pe = calcendpoint(p,x);cosa = cos(x(1));sina = sin(x(1));dist  = x(2) - p(1)*cosa - p(2)*sina;pe(1) = p(1) + dist*cosa;pe(2) = p(2) + dist*sina;

⌨️ 快捷键说明

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