⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newtintpoleval.m

📁 Interpolation routines in matlab
💻 M
字号:
%% Evaluate Newton's interpolating polynomial at% given points.%% function [p] = NewtIntPolEval( x, a, z )%% input:%        x:     vector containing the %               interpolation points%        a:     vector of coefficients of Newton's %               interpolating polynomial%        z:     vector of points at which Newton's %               interpolating polynomial has to be%               evaluated%% output:%        p:     vector of values of Newton's %               interpolating polynomial%%function [p] = NewtIntPolEval( x, a, z );n = size(x(:),1);if size(a(:),1) ~= n    error(' NewtIntPolEval: Dimension of a must be equal to dimension of x')endp = a(n) * ones(size(z));for i = n-1:-1:1    p = p .* ( z - x(i) * ones(size(z)) ) + a(i);end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -