False result why applying interp1 function!
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
Hi to all,
I have data taken at non-regular intervals, and I'd like to interpolate the data to have values every 100ms.
if
17:43:08.437 > ATT_HandleValueNotification: status=0 h=45 n=3 07 C7 17
17:43:08.477 > ATT_HandleValueNotification: status=0 h=45 n=3 07 C7 17
17:43:08.497 > ATT_HandleValueNotification: status=0 h=45 n=3 07 C7 17
17:43:08.516 > ATT_HandleValueNotification: status=0 h=45 n=3 07 C7 17
17:43:08.537 > ATT_HandleValueNotification: status=0 h=45 n=3 09 C7 17
17:43:08.577 > ATT_HandleValueNotification: status=0 h=45 n=3 07 C7 17
end
My code is :
if s=data(:,3)+data(:,4)/1000; % convert to seconds+fractions
t = datenum(2014,07,18,data(:,1),data(:,2),s)*86400;
t = t - t(1);
sample = interp1(t,res(:,1:3), 0:0.01:t(end)); % i fixed a time to 100ms to obtain estimated data in this time
// end
Thanks in advance
end
5 Kommentare
Azzi Abdelmalek
am 18 Jul. 2014
This is not clear, what are your data? cell array? sting?
Star Strider
am 18 Jul. 2014
This seems to be a duplicate of: http://www.mathworks.com/matlabcentral/answers/142334-interp1gives-me-error-results
inti
am 18 Jul. 2014
the cyclist
am 18 Jul. 2014
Bearbeitet: the cyclist
am 18 Jul. 2014
@inti,
By far the best thing you can do to help us solve your problem is to give us a small piece of functioning MATLAB code (including the part that defines the data) that illustrates the problem. Otherwise, we spend far too much time guessing.
inti
am 18 Jul. 2014
Antworten (0)
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!