![]() So, in your code, S(:,1) contains the sample points where your grid is defined, S(:,ii+1) contains your sampled values for your 1-D function, and U(ii,ii,:) contains the query points where you want to interpolate to find new functional values between known values in your grid. Vector xq contains the coordinates of the query points." "Vector x contains the sample points, and v contains the corresponding values, v(x). You are using the syntax: vq = interp1(x,v,xq,method) I don't know scipy, but I can tell you what the interp1 call in MATLAB is doing: Temp.append(interpolate.interp1d( S, S, U)) ] However, the code has been implemented around 2010]. My Python version is 3.4.1, MATLAB version is R2013a. ![]() ![]() Could you tell me if the code, I implemented is correct? I found that the scipy function interp1d should be what I'm after, but I'm not sure. The code uses the function interp1 in MATLAB. I'm converting a MATLAB code into a Python code. ![]()
0 Comments
Leave a Reply. |