File Exchange

image thumbnail

General Extra Toolbox

version 1.0 (32.5 KB) by

Generic functions for matrix manipulation, image processing, etc.

1 Download


View License

Contains several m files for matrix manipulation (grow, pad, roll, shift, scale, resize,...), matrix functions (count diferent elements, multi matrix max/min, set/get max/min values, fast tridiagonal system solver, fast max/min filter), matrix indexes manipulations, image functions (add noise, fast max/min filter, display image + marker image, posterize), colormap functions, search path functions, new 1D and 2D Fourier ploting style, etc.

Comments and Ratings (5)

David Stickland

I used gmax and found it to be a very useful extension of the max function. Thank you.

Frederico D'Almeida

The help file is not clear, I must admit. If you use the form x = THOMAS(a,b,c,d) the result will be much faster. Try it.

Valeri Karlov

I tried function thomas. It solves a tridiagonal linear system by an efficient Thomas method. But, how this function is implemented completely ignores Matlab's vectorization and sparse type. This makes even a straightforward Matlab's solution x = A\d ~twice faster (for large systems). But, using "sparce" simply makes the calculation instant (but not for thomas.m).
See the test attached:

n = 5000;
a = rand(n,1);
b = rand(n-1,1);
c = rand(n-1,1);
d = rand(n,1);
A = diag(a) + diag(b,1) + diag(c,-1);
% Non-sparse
xc = A\d;
xt = thomas(A,d);
% Sparse
A_s = sparse(A);
xc_s= A_s\d;
xt_s = thomas(A_s,d);

elapsed_time (non-sparse, x = A\d) =
elapsed_time (non-sparse, thomas.m) =
elapsed_time (sparse, x = A\d) =
elapsed_time (sparse, thomas.m) =

Duane Hanselman

While I assume that the functions in this collection of M-files work, I note that many of the functions make use of the MATLAB function EVAL even though equivalent vectorized solutions exist. As a result, many of the functions run orders of magnitude slower than necessary. The functions addpaths, gmax, gmin, limindex, lim2cell, mmax, mmin, pad, resize, rmpaths, shift, subdim all use EVAL, when none need to. In addition, numerous functions are not computationally efficient. For example the simple function y=iseven(x) can be written as y=mod(x,2)==0; rather than by the three statements in iseven.

MATLAB Release
MATLAB 5.2 (R10)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video