Message Boards Message Boards

0
|
8548 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

piecewise cubic spline

Posted 9 years ago

I am attempting to solve a piecewise cubic spline to connect multiple data points, for example as shown in Wikipedia here:

https://en.wikipedia.org/wiki/Spline_interpolation

and I think shown here in Wolfram Alpha:

http://www.wolframalpha.com/input/?i=cubic+spline

I have little experience with Wolfram Alpha but this week I purchased the Pro version and am using a Windows 64-bit machine. I have attempted to use the following code variations:

BSplineCurve[{1,1},{2,0},{3,3}, SplineDegree -> 3]

BSplineCurve[{1,0,3}, SplineDegree -> 3]

bsplinecurve[{1,1},{2,0},{3,3}, SplineDegree -> 3]

bsplinecurve[{1,0,3}, SplineDegree -> 3]

posted into the orange-bordered field on the main Wolfram Alpha website here:

http://www.wolframalpha.com

and

http://www.wolframalpha.com/input/

None of the above four code variations return any results. Instead I receive messages suggesting that Wolfram Alpha does not recognize the function BSplineCurve or a similar message. I am starting to wonder whether BSplineCurve is an old function that no longer works. I did notice for example, that bsplinecurve is blue in my post preview, but BSplineCurve is black. Nevertheless, I cannot obtain results using either one.

I have also found a similar thread on this forum site. The title of that thread is 'Solving Cubic Splines Symbolically'. I have tried copying code found there and posting it directly into the above orange-bordered field at the above links, but I obtain no results. I have also tried using the Data Input tab to enter the code also without obtaining results. Perhaps the code in the 'Solving Cubic Splines Symbolically' thread is Mathematica code that requires Mathematica and does not run on Wolfram Alpha.

How can I use Wolfram Alpha to solve a piecewise cubic spline in which separate cubic polynomial equations are used to connect adjacent data points?

Thank you for any assistance.

POSTED BY: Mark Miller
2 Replies
Posted 9 years ago

Thank you for the reply. I tried using your code in Wolfram|Alpha. Unfortunately, it did not return results. I am starting to think BSplineCurve is a Mathematica function that Wolfram|Alpha does not recognize. Although that seems odd given that the BSplineCurve function is shown by Wolfram|Alpha when I use it to search for the term 'cubic spline'.

POSTED BY: Mark Miller

I don't know about Wolfram|Alpha, but in Mathematica I get a spline with just an extra pair of curly braces:

Graphics[BSplineCurve[{{1, 1}, {2, 0}, {3, 3}}, SplineDegree -> 3]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract