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

Spline2D with 1D Array z values #57

Open
St0n89 opened this issue Feb 21, 2019 · 1 comment
Open

Spline2D with 1D Array z values #57

St0n89 opened this issue Feb 21, 2019 · 1 comment

Comments

@St0n89
Copy link

St0n89 commented Feb 21, 2019

Seems not to work, here my simple example that does not work.

using Dierckx
x=[0.7, 5.3, 3.3, 7.8, 2.2, 7.3]
y=[0.9, 0.6, 3.1, 2.1, 4.8, 4.2]
z=[3., 4., 7., 12., 18., 9.]
Spline2D(x, y, z)

error message is:
LoadError: Error on entry, no approximation returned. The following conditions
must hold:
xb<=x[i]<=xe, yb<=y[i]<=ye, w[i]>0, i=0..m-1
If iopt==-1, then
xb<tx[kx+1]<tx[kx+2]<...<tx[nx-kx-2]<xe
yb<ty[ky+1]<ty[ky+2]<...<ty[ny-ky-2]<ye
in expression starting at

Thanks

@kbarbary
Copy link
Collaborator

kbarbary commented Mar 1, 2019

My guess is that 6 data points is not enough to fit a spline with degree kx=3, ky=3. The error message is not very helpful though! I would try decreasing kx, ky or increasing the number of points. An improvement to the error message would be very welcome.

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

2 participants