This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

13 lines
412 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

uses NumLibABC;
// Интерполяция табличной функции кубическим сплайном
begin
var f:real->real:=x->(3*x-8)/(8*x-4.1);
var pt:=PartitionPoints(1.0,10.0,18).Select(x->new Point(x,f(x))).ToArray;
var oL:=new Spline(pt);
var r:=oL.Value(4.8);
Writeln('Значение аппроксимированной функции для х=4.8: ',r);
var (d1,d2):=oL.Diff(4.8);
Writeln('Значения 1-й и 2-й производых в этой точке: ',d1,' ',d2)
end.