📄 llength.m
字号:
function len=llength(x,y)%LLENGTH Length of a line.%% LLENGTH(X,Y) return the length of the line % described by X and Y.% The length is calculated as the sum of the% distances between two consecutive points.% % Claudio 6 September 1994.%%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu, mark@alice.uoregon.edu%n=length(x);if n ~= length(y) error('Vectors must be the same lengths.')endxi = x(1:n-1);xii = x(2:n);yi = y(1:n-1);yii = y(2:n); len = sum(sqrt((xi-xii).^2 + (yi-yii).^2)); return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -