No BSD License  

Highlights from
cut samples - interpolation

5.0

5.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 1.94 KB File ID: #3447
image thumbnail

cut samples - interpolation

by Aslak Grinsted

 

16 May 2003 (Updated 24 Mar 2006)

Interpolates irregular spaced data by 'cutting' the x axis into specified intervals.

| Watch this File

File Information
Description

A useful function for putting irregular spaced data on a regular spaced axis. Also works when the data locally has higher sampling resolution than the desired.

Example:
%create fake irregular spaced data
x=sort(rand(30,1));
y=sin(x*5)+randn(30,1)*.3;

%define the start and end intervals we want to have representative values of.

xsi=(-.2:.3:1.3)';
xei=xsi+.3;

%cut data into intervals ranging from xsi to xei:
yi=cutsamples(x,y,xei,xsi);

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
28 Mar 2006 Lalam Mahapatra  
Please login to add a comment or rating.
Updates
24 Mar 2006

Updated to that it can handle series with nans

Tag Activity for this File
Tag Applied By Date/Time
approximation Aslak Grinsted 22 Oct 2008 07:01:38
interpolation Aslak Grinsted 22 Oct 2008 07:01:38
cutsamples Aslak Grinsted 22 Oct 2008 07:01:38
irregular Aslak Grinsted 22 Oct 2008 07:01:38
filter Aslak Grinsted 22 Oct 2008 07:01:38
interp1 Aslak Grinsted 22 Oct 2008 07:01:38
resampling Aslak Grinsted 07 Jul 2011 09:44:18
decimate Aslak Grinsted 07 Jul 2011 09:44:20
upsample Aslak Grinsted 07 Jul 2011 09:44:24
downsample Aslak Grinsted 07 Jul 2011 09:44:29
time series Aslak Grinsted 07 Jul 2011 09:44:33
gap Aslak Grinsted 07 Jul 2011 09:45:08
boxcar Aslak Grinsted 07 Jul 2011 09:45:42
decimate Åke 03 Dec 2011 23:23:59
downsample Åke 03 Dec 2011 23:24:11

Contact us at files@mathworks.com