Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Interpolation of data
Replies: 2   Last Post: Jul 18, 2014 11:10 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
John D'Errico

Posts: 9,074
Registered: 12/7/04
Re: Interpolation of data
Posted: Jul 18, 2014 10:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"inti" wrote in message <lqb2c7$f7e$1@newscl01ah.mathworks.com>...
> Hi to all,
> i set a period (T) of sending signal = 100ms, but when in my file log i saw that the difference between sending signal is varying , as example: (437 after 477 , the difference between these is < 100ms) For this reason, i interpolated it to get an estimated constant interval T by using interp1 function.
>
> The problem here that after applying interp1 , it gives me a 4320 row data OR my spreadsheet RES contains 392.
> My program
>
> //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
>
>
> Is my program correct please? it is normal to obtain a rows sampled data > original data


Think about what you did.

What is the third argument you passed into interp1?

0:0.01:t(end)

What is t(1)? Why would you start interpolating at 0?
What do you expect it to do?

John



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.