Examples:
Insert the zeros-row on top of 3x3 matrix M = magic(3) bsxcat(1,0,M)
Concatenate the ones-column on right of 3x3 matrix M = magic(3) bsxcat(2,M,1)
It can eprform the following multidimensional array filtering: running filters in 1D and 2D, filters for image processing applications (erosion/dilatation), 3D and more.
The MEX engine uses an algorithms that requires no more than three...
Up to now, to find the first non-zero element of a matrix along a column (for example) user might:
1. Use for-loop with FIND command for j=1:size(A,2) ... = find(A(:,j), 1, 'first'); end 2. Use other...
Find the intersection points of the edges of two 2D polygons, a simple function made to follow up a Newsgroup discussion
Like histc but for n-dimension.
Unlike the other nd histogram http://www.mathworks.com/matlabcentral/fileexchange/3957 beside counting, this function returns also the location of points in the bins. Coded entirely in Matlab (no mex...
Find the projection of point P in R^n on the ellipsoid
E = { x = x0 + U*(z.*radii) : |z| = 1 }, where U is orthogonal matrix of the orientation of E, radii are the axis lengths, and x0 is the center.
Or on generalized conic E...
This kind of problem arises in statistics, linear algebra, and regularization.
The method uses quadratic eigen-value problem (QEP).
Return same information than with Matlab command feature('memstats') but in structure form.
Note that this function do not return EIGEN VECTORS.
This function is faster than looping on EIG when eigenvalues must be computed for a large number of matrices. The test shows it can speed up by 10 times
A = RANDSUBSET(N, K) is equivalent to
ALLSUBSETS = NCHOOSEK(1:N,K); A = ALLSUBSETS(RANDI(NCHOOSEK(N,K)));
% or
A = RANDPERM(N); A = SORT(A(1:k));
This function can also be used to generate... |