converting irregular space data into regular spaced data for time line interpolation
Mostra commenti meno recenti
HI i was given a dataset that has irregular spaced time and temperature.I am now struggling to do a time series linear interpolation since i dont know how to create a regularly spaced on hour time series from the data given. for example vq = interp1(x,v,xq,method,extrapolation);
i have the values for x and v but not xq. so how do i get the regular spaced data?
%%load data
A = load('../data2/Q1_data.txt');
B = load('../data2/Q2_data.txt');
C = load('../data2/Q3_data.txt');
D = load('../data2/Q4_data.txt');
%%Question 1 interpolation
a_date = (A(:,1));
a_temp = (A(:,2));
a_hourly = ?
A_linear = interp1(a_date, a_temp, min(a_hourly):max(a_hourly), 'linear', 'extrap');
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Interpolation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!