Interpolation of a dataset from two matrices

1 view (last 30 days)
T = readtable('torque110.xlsx','ReadV',0);
torquei = T_rpm_new(:,4);
throttle= [0 3 5 10 15 20 30 40 50 60 70 80 90 100];
T = T{:,:};
d = diff(T,1,2);
ad = cumsum(eps(1e3)*~[d,zeros(size(T,1),1)],2);
Tw = T + ad;
out = cellfun(@(x,y)interp1(x,throttle(:),y),num2cell(Tw',1),num2cell(torquei'));
T is Torque matrix of 8727*14. I have the Throttle value of order 1*14. I want to get throttle at torque value of torquei by interpolating it. The code is showing error as following:
Error using griddedInterpolant
The grid vectors must contain unique points.
Error in interp1 (line 161)
F = griddedInterpolant(X,V,method);
Error in test_sch_shifting_map_ex>@(x,y)interp1(x,throttle(:),y)
Error in test_sch_shifting_map_ex (line 166)
out = cellfun(@(x,y)interp1(x,throttle(:),y),num2cell(Tw',1),num2cell(torquei'));
  1 Comment
Debanjan Maity
Debanjan Maity on 24 Apr 2019
For convenience i am attaching three excel files. I need throttle values at specified torque values of third file.

Sign in to comment.

Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!