help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resampling non-uniform sampled data


From: Rob Mahurin
Subject: Re: Resampling non-uniform sampled data
Date: Thu, 2 Apr 2009 11:36:20 -0400

On Apr 2, 2009, at 5:30 AM, Sean87 wrote:
Hi,

I'm fairly new to Octave and I'm attempting to use it to analyse some data that has not been sampled at uniform time intervals. In order to proceed I need to have the sampling uniform. Does anyone know of a way to interpolate
and resample the data?


interp1 does this for 1d data:

# irregularly sampled and noisy "data"
x = sort( rand(1e2,1) );
y = x.^2 + 0.05 * randn( size(x) );
# interpolation
xi = linspace(0,1,100);
yi = interp1(x,y,xi);
plot(x,y,'o', xi,yi,'-x')

Cheers,
Rob

--
Rob Mahurin
Department of Physics and Astronomy
University of Tennessee                 865 207 2594
Knoxville, TN 37996                     address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]