Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Sample grid points support #1

Open
FlorianWolters opened this issue Apr 27, 2017 · 2 comments
Open

Feature request: Sample grid points support #1

FlorianWolters opened this issue Apr 27, 2017 · 2 comments

Comments

@FlorianWolters
Copy link

First of all: This project is awesome.

I would like to see support for the X, Y and Z arguments of MATLABs interp[n] functions (I am mainly interested in interp2). The splinterp documentation states the following:

Note that splinterp assumes the coordinates of the data are an integer grid and thus does not support the X, Y, Z parameters to the MATLAB equivalents.

Can you add this functionality maybe?

@Mark91P
Copy link

Mark91P commented Oct 17, 2017

Thank you for this awesome project!!

I would like to ask, like the issue comment before, the support to the MATLAB notation
interped_value = interp3(X,Y,Z,V,XQ,YQ,ZQ)
with the grid that can be a non integer argument (i.e. x=0.1:0.1:100)

thank you again!

@apryor6
Copy link
Owner

apryor6 commented Oct 18, 2017

Thanks for the feature request and support. I've been quite busy lately, and so have been slow to act on this particular project, but I will eventually get around to adding this.

For a hack solution, you can convert a regularly-spaced, non integer grid into an integer-grid that can be fed to the code by dividing the vector by the interval size and shifting the origin like so

x = linspace(-2,2,20)
dx = x(2)-x(1)
new_x = 1 + (x-min(x))/dx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants