?? testint.m
字號:
%% (Classical) Polynomial Interpolation%clear;x = [ 0; 1; -1; 2; -2];f = [ -5; -3; -15; 39; -9];z = [ 3 ];p = AitkenNeville( x, f, z );a = NewtIntPol( x, f, 1 );p = NewtIntPolEval( x, a, z )clear;x = [ 0; 1; 3; 2; 5];f = [ 2; 1; 5; 6;-183];z = [ 4 ];p = AitkenNeville( x, f, z );a = NewtIntPol( x, f, 1 );p = NewtIntPolEval( x, a, z )clear;x = [ 0; 1; 3; 5; 8; 2];f = [ 2; 3; 5; 7; 9;10];z = [ 4 ];p = AitkenNeville( x, f, z );a = NewtIntPol( x, f, 1 );p = NewtIntPolEval( x, a, z )clear;% Interpolation of Si(x) = int_0^x sin(t)/t dt x = [ 0; 0.1; 0.2; 0.3; 0.4; 0.5; 0.6; 0.7; 0.8; 0.9; 1.0];f = [ 0.0; 0.0999; 0.1996; 0.2985; 0.3965; 0.4931; 0.5881; 0.6812; 0.7721; 0.8605; 0.9461];z = [0.05; 0.25; 0.55; 0.75; 0.95; 1.5];p = AitkenNeville( x, f, z );a = NewtIntPol( x, f, 1 );p = NewtIntPolEval( x, a, z )%% Hermite Interpolation%clear;% Examples from Stoer/Bulirschx = [ 0; 0; 1; 1; 1];f = [ -1; -2; 0; 10; 40];a = HermiteInt( x, f )x = [ 0; 0; 0; 2; 3; 3];f = [ 1; 0;-1; 0; 2;-1];a = HermiteInt( x, f )
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -