Hi there,
I have the following data in MATLAB, as two vectors (Temperature and Concentration) and one matrix (Enthalpy):
I use the following code to get a value within the Enthalpy matrix using both vectors:
interp2(Temperature,Concentration,Enthalpy,10,5)ans = 37,22
Thats ok; Now I would like to get a value within Temperature Vector using the Concentration Vector and the Enthalpy Matrix as:
interp2(Concentration,Enthalpy,Temperature,55.58,88.6199)
which should give a value between 30°C and 40°C, but I get:
Error using griddedInterpolantThe number of input coordinate arrays does not equal the number of dimensions (NDIMS) of these arrays.Error in interp2>makegriddedinterp (line 228) F = griddedInterpolant(varargin{:});Error in interp2 (line 136) F = makegriddedinterp(X, Y, V, method,extrap);
Im little new using MATLAB, it surely shall be a dimension problem when I trying interpolate using a matrix and vector.
If anyone has any idea how to this, any help would be greatly appreciated.
Kind regards,
José C.
Best Answer