restructuring

This commit is contained in:
2022-03-10 11:04:14 +03:00
parent 29560b7c0c
commit 733dbd75d2
1758 changed files with 14 additions and 26855 deletions

View File

@@ -0,0 +1,13 @@
function idx = getknots(X, Y, dYmax)
%
% idx = getknots(X, Y, dYmax) - calculate piecewise-linear approximation knots for Y(X)
% dYmax - maximal deviation
%
idx = [];
I = getnewpt(X, Y, dYmax);
if(I > 0)
L = getknots(X(1:I), Y(1:I), dYmax);
R = I-1 + getknots(X(I:end), Y(I:end), dYmax);
idx = [L I R];
endif
endfunction