📄 bilin.m
字号:
function Z1 = bilin (x,y,Z,x1,y1)
%------------------------------------------------------------------------
% Usage: Z1 = bilin (x,y,Z,x1,y1)
%
% Description: Perform a bilinear interpolation of the surface f(x,y)
% evaluated at the points (x1,y1).
%
% Inputs: x = m by 1 vector containing independent variables
% y = n by 1 vector containing independent variables
% Z = m by n matrix containing dependent variables
%
% Z(k,j) = f(x(k),y(j))
%
% x1 = p by 1 vector specifying x evaluation points
% y1 = q by 1 vector specifying y evaluation points
%
% Outputs: Z1 = p by q matrix continain interpolated value of
% f(x,y) at (x1,y1).
%
% Notes: The independent variables in the vectors x and y
% must be strictly increasing.
%------------------------------------------------------------------------
chkvec (x,1,'bilin');
chkvec (y,2,'bilin');
chkvec (x1,4,'bilin');
chkvec (y1,5,'bilin');
Q = interp2 (x,y,Z',x1',y1);
Z1 = Q';
%------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -