MATLAB: Interpolate data with 2 variables

graphinterpolation

Hi,
I've been given a set of random engine speeds and a set of random torques and the corresponding fuel consumption data for that point. To simplify it I have this;
Engine Speed [256 509 789 1250 1449 1976]
Torque [ 22 31 48 78 112 140]
Fuel consumption [ 2568 459 440 400 329 298]
I have now been given a set of engine speeds and toruqes to find the fuel consumption at that point. The matrix of engine speeds and toruqes are larger than the data I have. I believe I need to interpolate it into a 3D graph to get the values for these points.
How do I go about this?
Many thanks

Best Answer

Your data are pretty sparse over the 2D space but you can try
F=scatteredInterpolant(S,T,F);
f=F(s,t);
where S,T,F are your data and s,t the lookup values.