Help using interp1 to resample data
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nathan
am 9 Okt. 2014
Beantwortet: Star Strider
am 9 Okt. 2014
Hi,
I have a series of data that spans 202 points. I want to resample it down to 172 points. Im using the interp1 function as:
data2(:,1) = interp1( [1:1:202] , data(:,1), [1:1:172] ,'spline') ;
But when I do this, data2 just returns the first 172 values of data. How do i actually get it to resample the entire data series to 172 points.
Thanks
0 Kommentare
Akzeptierte Antwort
Star Strider
am 9 Okt. 2014
I am not certain what you want to do, but this may work:
data = [1:202]'; % Create Data
xi = linspace(1,202,172); % Interpolation Vector
data2(:,1) = interp1( [1:1:202] , data(:,1), xi ,'spline') ;
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Splines 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!