Filter löschen
Filter löschen

LDV data Interpolating to equally spaced points

2 Ansichten (letzte 30 Tage)
Sayeed
Sayeed am 10 Sep. 2016
Beantwortet: Jordan Ross am 20 Sep. 2016
Hello I have a CSV file with data of time and corresponding velocity for 121 seconds from LDV experiments (Randomly sampled data).I need to interpolate it in equal time step. My aim is to calculate Velocity spectra like this figure.
Can anyone help me ?

Antworten (1)

Jordan Ross
Jordan Ross am 20 Sep. 2016
Hello Sayeed,
You could use the "interp1" function to interpolate your data set over equal spaced time steps. The documentation for the "interp1" function can be found here: https://www.mathworks.com/help/matlab/ref/interp1.html
Using your data as an example, you can interpolate the cooresponding velocities for a vector of time values as follows:
t = 0:.1:120; % Define a vector from 0 to 120 seconds, spaced by .1 seconds
vq = interp1(time,vel,t); % Interpolate the cooresponding values using your data set.
plot(t,vq) % plot the new data set
hold on
plot(t,vq, 'r*') % plot the old data set as red '*'

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by