User`s guide
Mathematics
4-15
Mathematics
Functionality being removed or changed
Functionality What Happens When
You Use This Functionality
Use This Instead Compatibility
Considerations
interp1(X, Y, Xq,
[], ...) where []
specifies the default
interpolation method
Still Runs interp1(X, Y, Xq,
'linear', ...)
Replace all instances
of interp1(X, Y,
Xq, [], ...) with
interp1(X, Y, Xq,
'linear', ...).
Passing mixed-
orientation vectors to
interp2:
Vq = interp2(x, y,
V, xq, yq)
Specifically, if one or
both of the following
are true:
• One of x and y is a
row vector and the
other is a column
vector.
• One of xq and yq is
a row vector and the
other is a column
vector.
Still Runs Construct the full grid
with meshgrid first.
Alternatively, use
griddedInterpolant
if you have a large data
set.
Modify all instances
that pass mixed-
orientation vectors
to interp2. You can
modify your code in one
of two ways:
• Call meshgrid to
construct the full
grid first.
[X,Y] =
meshgrid(x, y);
[Xq,Yq] =
meshgrid(xq,
yq);
Vq = interp2(X,
Y, V, Xq, Yq);
• Pass the vectors to
griddedInterpolant
inside a cell array.
F =
griddedInterpolant({x,
y}, V.');
Vq = (F({xq,
yq})).'