It sounds like you have
3 by 4 by 23 by 6
data points corresponding to
3 rpms, 4 altitudes, 23 CPs, 6 Js
and you want to interpolate across this data using the four values, rpm, altitude, CP and J.
Have you tried using a 4D Lookup Table?
If the 4D Lookup Table does match your needs, then it can be a lot more efficient.
Assuming the four inputs are scalar:
A 4D lookup table internally requires 15 interpolation calculations.
A 2D interpolation across a 23 by 6 matrix would require 414 interpolations, then 3 more interpolations for the final 2D interpolation stage.
If you have reason to breakup the calculations, rather than use 4D Lookup, consider using the prelookup blocks as the first stage.
The prelookup will provide the interpolation factors and the indicies into the needed sections of your 3 by 4 by 23 by 6 data.
Using the indices, you could use a block like a selector to extract just the data for the current output calculations.
This would allow much fewer interpolation calculations than working on the full 23 by 6 matrices.