Software Listing of Author : "Joshua Carmichael"
- Coherently aligns data
- License: Freeware
- Price: 0.00


This function treats a matrix as a column-wise set of signals and circularly shifts each column so that it aligns with the first column of data so that the inner product between those columns is maximized with respect to all other shifts. USAGE: [dataout,lagout]=xcorAlign(data); If only 1 output is specified, then dataout (a matrix the same size as data) is returned. INPUT: data: a matrix of data vectors stored column-wise. OUTPUT: y: A matrix size(data) back. lagout: Optional. A vector of lag indices. These give the amount the column vectors of dataout are shifted with respect to the first column of data.
- Publisher: Joshua Carmichael
- Date Released: 24-03-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- D8 Algorithm for Hydrological Models
- License: Freeware
- Price: 0.00


Step 1: Find flow direction (find min. potential of all adjacent cells) Step 2: Follow flow direction to sum the cumulative # cells flowing into a given "minimum" cell. Step 3: Find the maximum likely channel location in each E-W direction for a given number of channels. NOTE: The user should make sure that the upstream portion of the potential matrix Psi corresponds to first row of the matrix. USAGES [channel,I] = d8alg(Psi) [channel,I] = d8alg(Psi,numChans) [channel,I] = d8alg(Psi,Accum, numChans) [channel,I] = d8alg(Psi,Accum,numChans,'plot') INPUT: Psi: An MxN array giving the hydraulic potential over a grid. Accum: The accumulation matrix. This weights each cell with a fluid volume. Must be same size as Psi. numChans: The number of channels to be chosen per column. plotopt: Gives an option to plot images of the potential and...
- Publisher: Joshua Carmichael
- Date Released: 26-05-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- day of year
- License: Freeware
- Price: 0.00


Takes a date vector and returns the day of year, known incorrectly in the Geophysical community as the Julian calender day, i.e. 12/31/2005 is returned as day 365, day 06/22/2010 is returned as 173, etc... The function is vectorized. This function needs etime.m (R2009a and later). USAGES julday = datevec2doy(mydate) INPUT mydate: Either a 6xN or Nx6 array of date vectors, as output by functions like datevec. OUTPUT julday: An Nx1 array of julian days. ----------------------------------------------------------------------- EXAMPLE %Take the current day and add normally distributed random days to the %date. tadd = randn(1,12); mydate = datevec(now)'; mydate = repmat(mydate,1,12); mydate(2,:) = mydate(2,:) + tadd; day = datevec2doy(mydate);
- Publisher: Joshua Carmichael
- Date Released: 18-02-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- Dilates matrix data
- License: Freeware
- Price: 0.00


Dilates a time series input and resizes it to the orignal sample length input. If a matrix is input, dilation is done along columns. % The up/down sampling is done via resample.m, so low-pass filtering of the up/downsampling is automatically implemented. An anti-alaising, lowpass filter is applied to the data, and the signal delay is compensated for via resample. USAGE: [W]=dilateColumns(data); %default dilation is 2 [W]=dilateColumns(data,dilNum); %a vector of dilation values INPUT: data: A matrix of data vectors stored column-wise. dilNum: A vector of dilation values. Negative dilation values compress (downsample) the time series, while positive dilation values dilate (upsample) the time series. OUTPUT: W: The original data with the dilated data. The output matrix is arranged in order so that dilated data are stored in columns...
- Publisher: Joshua Carmichael
- Date Released: 11-03-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- matchPurs.m
- License: Freeware
- Price: 0.00


This function is a more robust and improved version of my previous submission, matchingpursuit.m This function computes the projection of a given input vector or matrix onto a "dictionary" of other vectors or matrices using a matching pursuit algorithm. Users may input a vector to be synthesized, or a matrix. The dictionary elements are input as arrays. See "help matchPurs.m". You must also download normColumns.m from the exchange.
- Publisher: Joshua Carmichael
- Date Released: 11-06-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- maxalign.m
- License: Freeware
- Price: 0.00


Aligns matrix entries so that the center of the time series corresponds to the maximum value of the time series.
- Publisher: Joshua Carmichael
- Date Released: 14-06-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- normColumns.m
- License: Freeware
- Price: 0.00


Data stored column-wise in an input matrix are normalized as time series, with options to output just the normalized data, or the norm of each column as well. Fast, uses no loops.
- Publisher: Joshua Carmichael
- Date Released: 17-06-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- plotColumns.m: plots columns in matrix as time series
- License: Freeware
- Price: 0.00


[h,varargout]=plotColumns(data,varargin) plots columns of a matrix as if each column is a time series USAGE: plotColumns(data); [h] = plotColumns(t,data); [h] = plotColumns(t,data,{colors}); [h] = plotColumns(t,data,'plotopt'); [h] = plotColumns(...,'plotopt'); [h] = plotColumns(...,{colors});
- Publisher: Joshua Carmichael
- Date Released: 26-01-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- plotXmatrix.m
- License: Freeware
- Price: 0.00


Plots columns of matrix data as distinct time series. User should normalize data first to minimize overlap.
- Publisher: Joshua Carmichael
- Date Released: 23-03-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- signalwidth.m
- License: Freeware
- Price: 0.00


Estimates the signal width of data input, using definition: rho = cumtrapz(t,x.^2)/trapz(t,x.^2) The integration limits go from mean(t)-w/2 and mean(t)+w/2; w is defined as the signal width, and gives the time at which rho % of the signal is captured. It is an informal measure of the localization of a signal. Rho, in most applications, is ~90%.
- Publisher: Joshua Carmichael
- Date Released: 19-04-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- sortwvfrms
- License: Freeware
- Price: 0.00


Sorts input matrix of data so that each column is re-ordered by user-specified criteria. Options are (1) sort data by signal width (2) sort data by energy localization (3) sort data by dissimilarity of data to a normal probability distribution. The default option is to return all 3 options, as vectors of indices so that W(:,Iw), for example, gives the data ordered by signal width. [varargout]=sortwvfrms(W,varargin) INPUT W: A matrix whose columns are time series to be sorted. sortopt: (Optional) A string. Can be either 'width', 'erg' or 'pdf'. Default is all three. plotopt: (Optional) A string. 'plot' produces a plot. Anything else doesn't. Inputting 'all' returns a plot of all 3 sorting results. OUTPUT I: a vector of indices that sorts the time series, so that W(:,I) has it's columns ordered by the specified criteria....
- Publisher: Joshua Carmichael
- Date Released: 07-02-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- wvfrms2bases
- License: Freeware
- Price: 0.00


Computes an orthogonal basis from a given criteria. Options are identical to those of sortwvfrms: basis are computed by signal width, localization, and noise. The vectors are sorted by the given criteria, projected onto a subspace orthogonal to the previously sorted vectors, and sorted in that subspace, then projected, etc. For example, in the case that 'width' is used as a sorting option, this function first finds the most 'compact' waveform among the entire set: that is, the waveform with with the smallest width. It then projects the matrix of data X onto a subspace orthogonal to this waveform. The function then finds the waveform with the smallest width in this subspace, and projects the data onto a subspace orthogonal to it, and so on. The end result is a basis for X formed of vectors with progressively broader signal widths. The...
- Publisher: Joshua Carmichael
- Date Released: 24-05-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- xcorAlign.m
- License: Freeware
- Price: 0.00


Circularly shifts input data in matrix by columns, according to cross correlation maximum index.
- Publisher: Joshua Carmichael
- Date Released: 06-05-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
