Hello everybody,
I have a time series with the average sample 1 second but samples some time delay more or less than that. I want to interpolate between those segments so i will have a sampling rate of 10ms, ie. creating 100 samples out of that. I know how to do it with a loops and logical expressions but was wandering if matlab has functions and tricks to do it faster. This is a piece of data i want to interpolate.
t=[00.3919121010000001.321776284000002.412116587000003.405859910000004.916038454000005.412360750000006.352662900000007.395910268000008.330718753000009.3508011580000010.328612848000011.321043794000012.328826490000013.321684722000014.390843887000015.341187239000016.998412938000017.381229969000018.330413549000019.352693420000020.332855178000021.914451393000022.339447578000023.342194412000024.350068668000025.354036315000026.635922474000027.332488932000028.3450633250000]
so out of 30 samples i want to create around 2834 samples.
thanks in advance.
if i will create let say:
for i=2:length(t); ti=[]; ti=t(i-1):0.1:t(i); tn{i-1}=interp1((t(i-1):t(i)),(t(i-1,1):t(i,1)),ti); end
will fail because
ti=[0 0.100 0.200 0.300]
which is not the same as
(t(i-1):t(i))=[0,0.39]
Best Answer