Publisher review:Nonmonotonic Path Interpolation - Interpolate nonmonotonic data to create a smooth curve [Yi,Xi] = PATHINTERP(X,Y,N,Type) interpolates the function y = f(x) as described by the data given in arrays X and Y.The interpolated outputs Yi and Xi are returned at all data points in X and Y as well as at points marking N subdivisions between consecutive data points. For example, if N = 2 the interval between the data pairs X(k), Y(k) and X(k 1), Y(k 1) is split in N = 2 intervals by adding one data point in between them. Therefore, NUMEL(Xi) = N*(NUMEL(X)-1) 1.Yi and Xi are the interpolated points returned as column vectors. For example, Xi(1)=X(1), Yi(1)=Y(1), Xi(end)=X(end), and Yi(end)=Y(end).Type is an optional string that determines the interpolation type.Type = 'linear' is linear interpolation,Type = 'spline' (the default) uses the function SPLINE, andType = 'pchip' uses the function PCHIP.Example: A spiral on the x-y planet = linspace(0,3*pi,15); % coarse dataX = sqrt(t).*cos(t);Y = sqrt(t).*sin(t);[Yi,Xi] = pathinterp(X,Y,9); % add 9 data points between each in X and Yplot(X,Y,'-o',Xi,Yi) % compare results
Nonmonotonic Path Interpolation is a Matlab script for Mathematics scripts design by Duane Hanselman.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris