0001 classdef (Abstract) Interpolant
0002
0003
0004
0005 properties
0006 data;
0007 end
0008
0009 methods
0010 function obj = Interpolant(x, y, z)
0011
0012
0013 if numel(x) ~= numel(y) || numel(x) ~= numel(z)
0014 error('x, y and z variables must have the same number of elements');
0015 end
0016
0017 obj.data = [x y z];
0018 end
0019
0020 end
0021
0022 methods (Static)
0023 function checkSizes(x, y)
0024 if numel(x) ~= numel(y)
0025 error('Input x and y query points must have the same number of elements');
0026 end
0027 end
0028 end
0029
0030 methods (Abstract)
0031 z = interpolate(obj, x, y)
0032 end
0033 end
0034