How to interpolate/resample an irregular dataset into 1 step spacing?
Mostra commenti meno recenti
Hi all!
I am trying to resample my irregular dataset (on age) to regular 1 step intervals. The data was previously resampled from depth to age using tie points, but I have no tie points to the 1 step intervals. I'm trying to interpolate the data 0:1:3000.
I have tried 'resample' and 'interp1' but think I must be doing something wrong as I get outputs not on regular 0:1:3000 steps, or error messages.
interval_resampled = resample(dataset_resample_issue(:,1);, dataset_resample_issue(:,2);, ((0:1:3000).'));
Error using resample
Expected input number 3, Fs, to be a scalar.
Error in resample>validateFs (line 842)
validateattributes(fs, {'numeric'},{'real','finite','scalar', ...
Error in resample>nonUniformResample (line 285)
validateFs(fs);
Error in resample (line 235)
nonUniformResample(isDimValSet,Dim, m, method1, dimIn, xIn, ...
Any advice would be much appreciated! Thank you!
Becky
1 Commento
What do you want to do?
The current ranges for the variables are:
LD = load(websave('dataset_resample_issue','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1205953/dataset_resample_issue.mat'));
dataset = LD.dataset
format longg
MinMax = [min(dataset); max(dataset)]
.
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!