Questions tagged [splines]

Smooth polynomial functions that are piecewise-defined.

67 questions
2
votes
0 answers

Spline Derivative

I am using the spline toolbox to make a bicubic spline as follows: ft = 'cubicinterp'; opts = fitoptions( ft ); [xInput, yInput, zOutput] = prepareSurfaceData( xMesh, yMesh, Z ); [fitresult, gof] = fit( [xInput, yInput], zOutput, ft, opts ); I…
user1493321
1
vote
1 answer

R: finding an archived package in RCRAN Archives (splines)

I'm looking for the "splines" package, and it doesn't seem to exist anymore?! Someone told me that you can find it in rcran Archives- does anyone know how to do that? Thanks~
mEvans
  • 905
  • 4
  • 15
  • 18
1
vote
1 answer

Extract the knots from a ns object

library(splines) x <- runif(100000) spline <- ns(x, df=5) How do I tell where the knots are in this spine object? > spline ['knots'] [1] NA str gets me close to what I need, but I'd like to be able to extract the vector of splines, format it, and…
Zach
  • 29,791
  • 35
  • 142
  • 201
1
vote
0 answers

How can I make a B spline with specific values of 1st derivative at breakpoints (not only ends) using MATLAB?

I used csape function in curve fitting toolbox, it enables the user of choosing derivative values at the both ends. Is there a way to control the value of the derivative a specific breakpoint? I want to set one of the values of the derivatives to be…
Robotawi
  • 11
  • 2
1
vote
0 answers

B-spline for non-polynomial splines in r

I intended to fit a 2D co-ordinate cloud, which resembles an incomplete ellipse. When I tried using bs() function from "splines" package in R to get the fitting curve (which is used to generate the B-spline basis matrix for a polynomial spline), it…
anna_bond
  • 11
  • 3
1
vote
1 answer

How to add a spline to rjags model

I am having difficulty finding information in fitting splines using rjags (my motivation is to try to recreate a glm in jags to impute missing dependent values). Anyhow I can find very little info on this finding only this answer on Cross-validated:…
user2498193
  • 1,072
  • 2
  • 13
  • 32
1
vote
0 answers

SVG keySplines animation issue/bug

There seems to be an issue regarding the SVG animation in case of keySplines. I'm using google chrome v46.0 The svg code,
1
vote
1 answer

polylines edges when using ports graphviz

I am using Graphviz to create a graph with nodes that are HTML-like labels. My dot file: digraph 0 { center = true charset = "UTF-8" overlap = false splines = true landscape = false id = "0" label = "Graph Example" labelloc =…
Simo
  • 25
  • 7
1
vote
0 answers

Splines in integer arithmetic?

Splines (the piecewise cubic polynomial form) can be written as: s = x - x[k] y = y[k] + a[k]*s + b[k]*s*s + c[k]*s*s*s where x[k] < x < x[k+1], the curve passes through each (x[k], y[k]) point, and a,b,c are arrays of coefficients describing the…
Alex I
  • 19,689
  • 9
  • 86
  • 158
1
vote
1 answer

Transform shape built of contour splines to simple polygons

I've dumped glyphs from truetype file so I can play with them. They have shape contours that consist from quadratic bezier curves and lines. I want to output triangles for such shapes so I can visualize them for the user. Traditionally I might use…
Cheery
  • 24,645
  • 16
  • 59
  • 83
1
vote
4 answers

Modify function calls within a formula

Suppose you are working on a regression model and at least one of the predictors is estimated via splines, e.g., library(splines) data(diamonds, package = "ggplot2") fit <- lm(price ~ bs(depth, degree = 5) + bs(carat, knots = c(2, 3)) * color, …
Peter
  • 7,460
  • 2
  • 47
  • 68
1
vote
1 answer

interpolating 4D data

I have a set of GPS stations, whose coordinates I know (x,y,z), and for each station, I also have an error (e). These stations are of course unevenly spaced, otherwise it would be too easy. The thing is, in order to compute my error e for a station,…
Efferalgan
  • 1,681
  • 1
  • 14
  • 24
1
vote
1 answer

Wrong template arguments for Eigen::Spline with Eigen::AutoDiff

The Solution from the EDIT is now posted as answer. Old Question I want to include spline interpolation of Eigen::Spline into a larger formula and want to determine the derivative of this formula with the help of Eigen::AutoDiff. I tried the…
Tobias
  • 5,038
  • 1
  • 18
  • 39
1
vote
1 answer

How can I force "no splines" in GraphViz html-like labels?

I am interested in making all of the edges in this graph straight. From what I understand, setting splines to false should do this. In one case, an edge has no splines, and goes right over the top of another node. In the case of the html-like label,…
1
vote
2 answers

Can't get transformed points out of a kinetic JS line

I have been able to successfully draw a line using Kinetic JS, as follows: var track129 = new Kinetic.Spline({ points: [ {x: 3, y: 400}, {x: 196, y: 400}, {x: 213, y: 395}, {x: 290, y: 345}, {x: 319, y: 324}, {x: 389, y: 253}, {x: 457, y:…
user427897
  • 123
  • 1
  • 6