image thumbnail

updated 9 hours ago

Markov Chain Monte Carlo - mcmc.m by Aslak Grinsted

Markov Chain Monte Carlo sampling of posterior distribution (metropolis, mcmc, likelihood)

[models,logP]=mcmc(m,loglikelihood,logmodelprior,stepfunc...

image thumbnail

updated 7 days ago

flexload.m by Aslak Grinsted

A simple and flexible text data file parser (textread, parse, dat)

[d,txt]=flexload(fname)

image thumbnail

updated 12 days ago

ImGRAFT by Aslak Grinsted

An image Georectification and Feature Tracking toolbox (template matching, georectification, georeferencing)

image thumbnail

updated 1 month ago

positive degree day for normally distributed temperatures by Aslak Grinsted

expected positive degree days per day (pdd, normally distributed, positive degree days)

fPDD=normalpdd(Tmu,sigma)

image thumbnail

updated 1 month ago

fastscatter.m by Aslak Grinsted

A much faster scatterplot (scatter, scatterplot, points)

h=fastscatter(X,Y,C,varargin)

image thumbnail

updated 1 month ago

Load region of interest from geotiff & geojp2 files by Aslak Grinsted

Extract a sub-region of a geotiff or a geo-jpeg2000 file (geotiff, tiff, geotif)

[A,x,y,I]=geotiffreadregion(fname,xlim,ylim)

image thumbnail

updated 1 month ago

Steady state snow and firn density model by Aslak Grinsted

Calculates snow/firn depth density profiles using Herron-Langway type models. (snow, firn, herron)

[rho,zieq,t]=densitymodel(Tavg,bdot,rhos,z,model)

image thumbnail

updated 3 months ago

Subaxis - Subplot by Aslak Grinsted

Use HTML jargon for multi axis layout. (annotation, customization, subplot)

ArgStruct=parseArgs(args,ArgStruct,varargin)

h=subaxis(varargin)

image thumbnail

updated 3 months ago

savefigure by Aslak Grinsted

Easy way of saving figures to publication friendly format. (graphics import, graphics export, save)

ArgStruct=parseArgs(args,ArgStruct,varargin)

[varargout]=savefigure(fname,varargin)

image thumbnail

updated 8 months ago

Voxel viewshed by Aslak Grinsted

Returns the visible area of a DEM from a given camera location. (viewshed, voxel, dem)

vis=voxelviewshed(X,Y,Z,camxyz)

image thumbnail

updated 1 year ago

netcdfobj - netcdf made easy. by Aslak Grinsted

Easy interface for reading netcdf files. (netcdf, object, data import)

time=cdfdate2num(units,calendar,time)

netcdfatt

netcdfdim

image thumbnail

updated 1 year ago

Naming figures (fig.m) by Aslak Grinsted

Create new figures with a window title which can be used as a handle. (annotation, customization, figure)

H=fig(varargin)

image thumbnail

updated 3 years ago

timedwaitbar.m by Aslak Grinsted

A progress bar in a single line of code with ETA (progressbar, progress, waitbar)

timedwaitbar(x,varargin)

image thumbnail

updated 3 years ago

quantreg.m - quantile regression by Aslak Grinsted

Quantile regression with bootstrapping confidence intervals (statistics, quantile, median)

[p,stats]=quantreg(x,y,tau,order,Nboot);

image thumbnail

updated 3 years ago

fftnoise - generate noise with a specified power spectrum by Aslak Grinsted

Useful helper function for Monte Carlo null-hypothesis tests and confidence interval estimation. (surrogate, noise, random)

noise=fftnoise(f,Nseries)

image thumbnail

updated 3 years ago

gap size by Aslak Grinsted

Calculates number of consequtive NaNs in a vector. (gap, nan, length)

sz=gapsize(x)

image thumbnail

updated 3 years ago

Moving averages / Moving median etc by Aslak Grinsted

Calculates moving averages (or median/fun) of a timeseries. (time frequency, wavelets, moving averages)

[y]=moving(x,m,fun)

image thumbnail

updated 6 years ago

Tidal fitting toolbox by Aslak Grinsted

fit tidal components to an observed series of sea level and use them for prediction (tidal model, tides, sea level)

ArgStruct=parseArgs(args,ArgStruct,varargin)

dispmtx(M,varargin)

tidal=tidalfit(data,varargin)

image thumbnail

updated almost 7 years ago

Seam Carving for content aware image resizing by Aslak Grinsted

illustrative example of the seam carving algorithm. (seam carving, image resizing, content aware)

im=seamcarving(im,k)

image thumbnail

updated 8 years ago

Surfer Griddata by Aslak Grinsted

A gridding interface with surfer (v7). Works just like griddata. (griddata, surfer, kriging)

[Xi,Yi,Zi]=surfergriddata(X,Y,Z,Xi,Yi,method)

image thumbnail

updated 8 years ago

cut samples - interpolation by Aslak Grinsted

Interpolates irregular spaced data by 'cutting' the x axis into specified intervals. (approximation, interpolation, cutsamples)

yi=cutsamples(x,y,xsi,xei)

image thumbnail

updated 8 years ago

Average mutual information by Aslak Grinsted

Average mutual information (statistics, probability, ami)

[v,lag]=ami(x,y,lag)

image thumbnail

updated 9 years ago

Moving variance by Aslak Grinsted

Calculates moving variance of a time series. (statistics, probability, moving variance)

v=movingvar(x,m);

image thumbnail

updated 9 years ago

samexaxis (nice subplots with same x axis) by Aslak Grinsted

Makes it alot easier to make nice figures with the same x axis. (annotation, customization, same x axis)

samexaxis(varargin)

image thumbnail

updated 9 years ago

dispmtx by Aslak Grinsted

Display a matrix in a nicely formatted way. (disp, matrix, dispmtx)

dispmtx(M,varargin)

image thumbnail

updated almost 10 years ago

RD3 Library by Aslak Grinsted

Loads and saves rd3 files (ground penetrating radar). (rd3, rad, radar)

[A,twt]=loadrd3(fname,varargin)

[dA,twt]=diffrd3(fname)

infos=rd3info(fname,varargin)

image thumbnail

updated almost 10 years ago

Boxpdf, Percentile by Aslak Grinsted

Returns the percentile of each sample in a vector (effectively 'boxing' the pdf). (statistics, probability, percentile)

[boxedX,Bx,By]=boxpdf(X)

image thumbnail

updated almost 10 years ago

Parse function arguments by Aslak Grinsted

A useful tool for parsing function arguments like 'cellspacing',6,'monkey',1 (parse, function, arguments)

ArgStruct=parseArgs(args,ArgStruct,varargin)

image thumbnail

updated almost 10 years ago

normalizepdf.m by Aslak Grinsted

Forces the pdf of data to be normal. (statistics, probability, normal)

[normX,Bx,By]=normalizepdf(X)

image thumbnail

updated 11 years ago

tcolor (a fast pcolor that likes RGB images) by Aslak Grinsted

Draws an image as a texture to a plane. (specialized, plotting, pcolor)

H=tcolor(x,y,c,varargin)

Contact us