ButterParam - Fast parameters for a digital Butterworth filter
The calculation of filter parameters with BUTTER is expensive. Therefore ButterParam stores calculated parameters in a lookup-table to accelerate repeated calls with the same input.
x = rand(10000, 1); % test data
[B, A] = butter(3, 0.6);
y = filter(B, A, x);
The relation of the processing times is: BUTTER=68% / FILTER=32%!
This is a simple but fast check, if two arrays contain any common element.
If no common element is found, the C-Mex is 30% to 50% faster than the equivalent Matlab expression "any(X(:) == y)" and much faster...
DATAHASH - Checksum for Matlab array, struct, cell or file
Hash = DataHash(Data, Opt)
Data: Array of built-in types (U)INT8/16/32/64, SINGLE, DOUBLE (real or complex)
CHAR, LOGICAL, CELL, STRUCT (scalar or array, nested),...
Get correct case of file or folder by repeated calls of DIR
FileName = FileRealCase(FileName)
FileName: String, absolute path of an existing file or folder.
UNC paths are accepted.
WINDOWAPI - Set window properties using the Windows API
There are a lot of functions in the FEX to set the figure properties, e.g. maximized, minimized, always-on-top, level of transparency (using Java).
This submission adds 4 new...
FilterM, FiltFiltM: Fast digital filter
These functions are compatible to MATLAB's FILTER and FILTFILT commands,
but they are faster (see screenshot):
FilterM: 30%-40% of FILTER runtime
FiltFiltM: 4%-20% of FILTFILT...
UniqueFuncNames - Check uniqueness of function names
If you install a large 3rd party toolbox, the file names may interfere with other installed toolboxes. This simple funtion compares the names of all M-, P- and Mex-files found in the...
ISVALIDSYMBOL - Check string to be a valid Matlab symbol
This function is equivalent to Matlab's ISVARNAME, but accepts cell strings as input also. While the speed is comparable for strings, it is *much* faster for cell strings (see...
Compare last N chars of strings or cell strings
Input and output equal Matlab's STRNCMP/STRNCMPI, but the strings are compared from right to left.
T = strncmpr(S1, S2, N) or T = strncmpir(S1, S2, N)
XSum - SUM with error compensation
The accuracy of the sum of floating point numbers is limited by the truncation error. E.g. SUM([1e16, 1, -1e16]) replies 0 instead of 1 and the error of SUM(RANDN(N, 1)) is about EPS*(N / 10).