RAND_INT(R,N) returns an n-by-n matrix containing pseudo-random integer values from range R.
Function that uses RAND to generate random integers in the specified linear range, as follows:
result = floor(a + (b-a+1).* rand(N)),
where specified range is [a b]
Please note: There are lots of ways to do this and lots of interesting submissions on FEX which provide similar results (see below).
Function that transforms 1 or 2D data to match a specified linear dynamic range.
NORMALIZE_IMAGE(I,R) applies a linear transformation to the dynamic range of I, mapping pixel intensities to new values over the range R.
Patchwork is a GUI wrapper for the IMAGEPATCH function which allows
images or matrices to be pasted, or "patched" together. Single images are loaded by the user and placed within a composite image according to user-adjustable image...
REFRAME(I,R,B) applies PADARRAY to subregion, R, returning an image with the dimensions of image, I.
This function is meant to work with the MatLab image toolbox function REGIONPROPS and expects the following inputs,
I is the original...
Useful functions for manipulating and fitting data using the modified Rosin-Rammler distribution.
These functions are pretty straightforward, and are provided primarily as a simple, useful curve-fitting example. Much of the code is...
NUM2ABC(X), where X is an integer, returns a string corresponding to the column label commonly employed by spreadsheet programs, such as Microsoft
x = 45;
INVERSE_CAT splits a given data array into sub-arrays along the specified dimension.
[A B]=INVERSE_CAT(DIM,C) splits array C along dimension, DIM, returning sub-arrays A and B.
M = [1 2 3; 4 5 6; 7 8 9];
DECIMAL_CONVERT generates a vector of coefficients representing a base 10 integer in a chosen base.
DECIMAL_CONVERT(D,B) returns the representation of decimal integer, D, as a vector of coefficients such that:
D = xn*B^n + ... +...
ABC2NUM(S), where S is a one or two letter string representing a column label commonly employed by spreadsheet programs, returns a number corresponding to the spreadsheet column indicated by S.
S = 'CS';
03 Mar 2012 (Updated 06 Mar 2012)
Function to generate a listing of the coordinates for a specified Cartesian space.
A = ENUM_COORDS(X) returns the matrix elements of a 2D region, where X contains a 4-element vector, X=[x y width...