I threw this together for myself, because I wanted a version of interp with differences 1, 2, and 3 (below). I'm sure it's not as fast as it could be - feel free to comment on any potential improvements, or on any bugs.
Differences from MATLAB built-in functions:
1. MUCH faster
2. Extends border values instead of returning NaN
3. If coordinate is exactly on the spot, it doesn't look at neighbors. Example of why...
Side planes of Surf plot
There is no command such as meshz for surf plots with shading interp option in matlab. My surfz function has reference planes of surf plots.
TPColor is chart for visualization 2D arrays. Product area - visualization of scientific calculations. The values of elements of the array define color used for their image. There are four modes of the image: 'Flat', 'Interp' - interpolation,...
This file improves on the functionality of interp1 and allows the resampling of more complex data. Measurements can be taken completely arbitrarilly and need not be unique.
Target uses are for data which is sampled against a signal that...
Fixes x data so that interp1 doesn't return error:
'The values of X should be distinct.'
Checks for duplicate values in input 1D data array and returns array where all values are distinct. If duplicates are found, values are...
Kriging and inverse distance are popular interpolation methods, especially in earth sciences. There are some routines already available on matlab but are severely limited by matlabs memory constraints. By using gstat to handle interpolation and...
When drawing financial time series from various markets, one usually needs to make some adjustments before evaluating the series. One of the major concerns is that due to different national holidays or working days across countries, the dates...
The function makes use of the inbuilt interp1 function to perform 2D extrapolation on a given data set. The input to the function is in the same format as required by interp2.
eg. Zi = interpextrap2(X,Y,Z,Xi,Yi).
Only it does...
Revised 23rd Feb. 2006.
Improved speed, functionality and documentation
2-nd Rev, 3rd Apr.2007, back from TVAR to NUM2STR
MAXimum points in a curve, ALL(default) or manually positively/negatively selected, with (default) or...
Y = INPAINTN(X) replaces the missing data in X by extra/interpolating the non-missing elements. The non finite values (NaN or Inf) in X are considered as missing data. X can be any N-D array.
When interpolating a multivalued function (more than one y for each x), interp1 produces, at best, an error (if there are identical x data), and at worst, garbage (see the attached image). This function performs meaningful interpolation of a...
HOWCOMMON takes a pair of vectors and returns uniquely sampled domains with corresponding values for the range. Unlike functions such as INTERP, however, duplicate domain input values are accepted, and the appropriate type of output can be user...
NaN 0 1 NaN % NaN= not a number
0 0 1 1
0 0 1 1
NaN 0 1 NaN
NaN 0 1 NaN
NaN NaN NaN NaN
NaN 0 0 NaN
0 0 0 0
1 1 1 1
NaN 1 1 NaN
NaN 0 0 NaN
NaN NaN NaN...
This function produces a colorbrewer table (rgb data) for a given type, name and number of colors of the colorbrewer tables. For more information on 'colorbrewer', please visit: http://colorbrewer2.org/
The tables were generated from...
Spherium allows for the creation of a cornicopia of curious 3D objects and offers full interactive control over lighting and orientation.
Spherium contains a function (fig2pic) which can construct very high resolution images of any...
This function revolves a 2D polygon around the Z-axis. It copies the 2D data points evenly around the axis and produces a 3D data set suitable for input to MESHGRID and GRIDDATA to create a 3D surface.
Smooths 2D array data. Ignores NaN's.
function matrixOut = smooth2a(matrixIn,Nr,Nc)
This function smooths the data in matrixIn using a mean filter over a
rectangle of size (2*Nr+1)-by-(2*Nc+1). Basically, you end up...