Stretching data to fit a specific window
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi all,
I have large amounts of data that are sampling at incorrect intervals. I want to compare the signals, but they don't properly line up because of the sampling rate. I want to be able to stretch or shrink the data to a specific number of samples, but maintain overall shape.
x = linspace(0,2*pi,110);
Y = sin(x);
xi = linspace(0,10);
yi = interp1(x,Y,xi);
plot(xi,yi)
What I want out of this is one full cycle of a sin wave, but stretched from a period of 2*pi and 110 samples to a period of 10 with 100 samples even.
I'm sure there is an easy way to do this, but I've been racking my brain and can't seem to find a solution.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Curve Fitting Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!