Linspace
Analogue to linspace, but inputs are: start value, spacing, and # points.outputarray = linarray(start,spacing,numpoints) The function linarray generates an row vector based on a start value, a spacing, and a number of points. For example: linarray(1, 0.1, 5) returns:[1.0000 1.1000 1.2000 1.3000...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): Linarray - alternative to linspace Download |
This function will create a matrix of linearly spaced vectors.Example 1: Vector starting and ending pointsx1 = 100*randn(10,1);x2 = 100*randn(10,1);M = linspace2(x1,x2,1e3);imagesc(M)Example 2: Mixing Vectors and Scalarsx1 = 100*randn(10,1);x2 = 0;M = linspace2(x1,x2,1e3);imagesc(M)Suggestion to...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): Vectorized linspace Download |
[coef, RSquared]=plotfit(x,y,polyorder)A simple function that accepts x,y data pairs in in the vectors "x" and "y", fits it to a polynomial of order "polyorder", plots the data and the fit, and displays the fit coefficients and the goodness-of-fit measure R-squared in the upper left corner of the...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (45): plotfit Download |
Appreciable errors in MSIS00 modeled temperatures can occur for altitudes above 75 km if solar flux and magnetic indices deviate significantly from their default values. This routine automatically downloads needed solar flux and magnetic indices from ftp.ngdc.noaa.gov and formats them for input...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (41): F10.7 Solar Flux & Ap Indices Download |
HILBERT2 Extract instantaneous envelope and frequency from a bandlimited signal via Hilbert transform. [ENV FREQ] = HILBERT2(X,FS), for vectors X, returns estimates of the instantaneous envelope and frequency. X is assumed to be a band-limited signal sampled at a rate specified by FS (in units...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (46): hilbert2 Download |
Suppose that you have a signal Y (Y can be a time series, a parametric surface or a volumetric data series) corrupted by a Gaussian noise with unknown variance. It is often of interest to know more about this variance. EVAR(Y) thus returns an estimated variance of the additive noise.EVAR provides...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (44): Noise variance estimation Download |
SIMPGRIDSEARCH Multi-dimensional unconstrained nonlinear minimization using grid search + Simplex method. X = SIMPGDSEARCH(OBJFUN,GDVALUES) returns a vector X that is a minimizer of the function described in OBJFUN (usually an m file: OBJFUN.M).See OBJFUN_DEMO.M for how to write an objective...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (47): SIMPGDSEARCH Download |
function mHist = hist2d ([vY, vX], vYEdge, vXEdge)2 Dimensional HistogramCounts number of points in the bins defined by vYEdge, vXEdge.size(vX) == size(vY) == [n,1]size(mHist) == [length(vYEdge) -1, length(vXEdge) -1] EXAMPLEmYX = rand(100,2);vXEdge = linspace(0,1,10);vYEdge =...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): 2D Histogram Matrix Download |
function [h1, h2] = plot_dir3 (vX, vY, vZ) Plotting x-y-z variables with direction indicating vector to the next element. Example vX = linspace(0,2*pi, 10)'; vY = sin (vX); vZ = cos (vX); plot_dir3(vX, vY, vZ);
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (41): Plot With Direction 3D Download |
function histmat = hist2(x, y, xedges, yedges) Extract 2D histogram data containing the number of events of [x , y] pairs that fall in each bin of the grid defined by xedges and yedges. The edges are vectors with monotonically non-decreasing values.The code is optimized no loop inside, it can be...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (49): 2D Histogram Calculation Download |
The function waslh_func.m computes the Walsh Function of order n and length mExample:[W,t]=walsh_func(1000,5);Results:W is the Walsh function of order 5 and lenght 1000t is equal to linspace(-0.5,0.5,1000);I follow the description of Walsh Functions given inGermain Castellanos dodalvaro...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (41): Walsh Functions Download |
EZFFT(T,U) plots the power spectrum of the signal U(T) , where T is a 'time' and U is a real signal (T can be considered as a space coordinate as well). If T is a scalar, then it is interpreted as the 'sampling time' of the signal U. If T is a vector, then it is interpreted as the 'time' itself....
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (43): EZFFT : An easy to use Power Spectrum (FFT) Download |
FASTRMS Instantaneous root-mean-square (RMS) power via convolution.FASTRMS(X), when X is a vector, is the time-varying RMS power of X, computed using a 5-point rectangular window centered at each point in the signal. The output is the same size as X and contains, for each point in X, an estimate...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (44): Screenshot Fast root-mean-square (RMS) power Download |
[Fs,Vs]=subtri(F,V,n)Sub-triangulates the triangles defined by the patch format data F (faces) and V (vertices). Can be used to increase the density of triangulated data or to triangulate the icosahedron to create geodesic sphere triangulations with desired density.Creates n addition points on...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (39): subtri Download |
Some curve fitting or smoothing tools can benefit from knowledge of the noise variance to expect on your data. Kalman filters use this information, also some spline fitting tools. So I wrote a function to extract the noise variance from a signal vector. It also works on any specified dimension of...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (43): Estimatenoise Download |
This program places dates on time axis as DATETICK and works with ZOOM and PAN as DATETICKZOOM by Christophe Lauwerys. But, it also shows the full date after zooming or panning by using the ticks and time-axis label. So, if you zoom in down to second, you won't loose "when" you are.The input...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (50): tlabel.m (Sep 2009) Download |
This function generates patch data (faces d-deDUFd-deDt, vertices d-deDUVd-deDt and color data d-deDUCd-deDt) for 3D images. The patches are only generated for the voxels specified by the linear indices in d-deDUINDd-deDt. The variable d-deDUptyped-deDt indicatesthe type of patch:d-de?vd-deOao...
Platforms: Matlab
License: Freeware | Size: 10 KB | Download (39): ind2patch Download |
LINSPACE_ROUND generates a row vector of equally spaced points that bound the input values. The spacing is chosen such that tenths and quarters are considered "rounded" fractions.Example: If X1 = 3.4, X2 = 7.5, N = 6, then LINSPACE_ROUND(X1,X2,N) returns: [2.8 3.5 4.2 4.9 5.6 6.3 7.0 7.7](in...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (43): linspace_round Download |
histnd Histogram count of ND data with ND bins histmat = histnd(x, y, ..., xedges, yedges, ...) Extract ND histogram data containing the number of events of [x, y, ...] tuples that fall in each bin of the ND-grid defined by xedges, yedges, .... The edges are passed to histc internally and should...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 10 KB | Download (44): histograms for ND data Download |
Specifying an object as a shape results in fewer edge artifacts in the reconstructed image than with projections from radon.m, which specifies the object as an image.A comparison of reconstructed images with CTProjSim and radon.m is given athttp://aprendtech.com/wordpress/?p=89The object starts...
Platforms: Matlab
License: Shareware | Cost: $0.00 USD | Size: 92.16 KB | Download (39): CT Projection Simulator Download |