Hi everyone,
I am struggling with the following problem:
I have a dataset (Map3D.mat file is included) for which I am trying to fit a function where I have 3 variables and one value for a combination of these 3 variables.
The variables are engine power, altitude and speed. The value is the fuel consumption of the engine. I want to fit this fuel consumption data with a function in such a way that engine power, altitude and speed are input variables and fuel consumption is the output variable. Is this possible? I have been trying stuff with fitnlm but I cannot get it working. I dont get how I can change my data structure to the required format. The Map3D.mat file is structured as follows: 7x21x4 (speed x power x altitude). With a speedvector from as Speed = 0:10:60, a powervector as Power = 5:10:205 and an altitudevector as Altitude = [0 300 600 700].
Currently I found a workaround with the interp3 function which works okay, however it increases the computation time of my code significantly compared to a function evaluation because it gets called often as it is within an iteration loop. I also expect my code to converge faster with a function which fits the desribed dataset.
I am really looking forward to see what you guys think!
Toon
Best Answer