How do i inpolate two difference vectors to same length

1 view (last 30 days)
Hello Community
I have two different datasets in .xlsx and .csv format. Both are made by logging physical sensors. The reference for all data is rpm (rounds per minute) which is representated in both documents. Besides this there is also a "Fuel usage" in the first document and "power measurement" in the other document.
My problem is i need to calculate the fuel efficiency -> the fuel usage rate compared to power level of engine. But the two vectors are of size 1:770 and 1:4620. That makes it impossible to compare data.
Is there any way to interpolate both vectors, so vector start at 800rpm and stop at 2500rpm with 10rpm step, and connect this rpm referance to fuel usage and power level?
I will really appreciate a solution on this.

Accepted Answer

Ameer Hamza
Ameer Hamza on 16 Mar 2020
Attach a sample dataset for a more specific example.
  3 Comments
Mads Petersen
Mads Petersen on 19 Mar 2020
Thank you very much for your help and solution! Its highly apriciated
Cheers

Sign in to comment.

More Answers (1)

Mads Petersen
Mads Petersen on 16 Mar 2020
Thank you for answer. I have already tried the interp1 function without succes.
I have attached both enginepower document and fuelusage document.
If you, or anyone else have the time to create a code for makin this work i can pay for solution, as i am in a bit of hurry. thanks
  1 Comment
Mads Petersen
Mads Petersen on 16 Mar 2020
Code must work on all kind of vector lengths, as they depend on measuring time. but the rpm is always in interval [800;2500]

Sign in to comment.

Categories

Find more on Interpolation in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!