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,8 @@
function [x0 y0 k] = linearapprox(X,Y)
%
% [a b] = linearapprox(X,Y) - find linear approximation of function Y(X) through first and last points
% y = y0 + k*(X-x0)
%
x0 = X(1); y0 = Y(1);
k = (Y(end) - y0) / (X(end) - x0);
endfunction