Items tagged with spline spline Tagged Items Feed

I'm trying to interpolate values using spline (data,x,degrees=2).

So I'm setting curvefit:=spline(data,x,degrees=2);

fsolve(curvefit=4,x);

However, I'm trying to solve this over a range of values in matrix M:=1..2000;

I'm sifting through the online documentation, but I can't find a proper way to do this. Ideally, i'd want to store the results as a seperate matrix.

Plotting spline...

February 28 2014 uarsy 5

Hello, 

I have to show cubicspline(...) and some kind of known function on the same axis, but it seems I can only show cubicspline(..) using Draw, but it cannot plot the function, so I can do only one at a time. Does anyone know how to do it?

Plotting a Spline...

February 03 2014 Leo BN 5

Hello, Mapleprimes' users.

 

I am using spline to fit a function to a given data (instead of polynomial). I created two examples with data of y=cos(x). 

The first example has a domain X=0..10 and its result is satisfactory.

Ths second example has a larger domain, X=0..15, but I couldn't plot the spline function. The function fits well, but its line ends at X=~10.

Then I ckecked this spline assigning several values of X, and all the results are correct. The problem is on the plot step.

My mw file is:

> restart;
> with(plots);
> with(CurveFitting);
> plotsetup(default);

First Exemple Data (Y=cos(X)):
> X := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
> Y := [1, .54, -.41, -.99, -.65, .28, .96, .75, -.14, -.91, -.83];
> Piece1 := spline(X, Y, x, 2);
> fig1 := plot(Piece1, view = [0 .. 15, -1 .. 1]);
> fig2 := pointplot(X, Y);
> display(fig1, fig2);
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Second Example Data (Y=cos(X))::
> X := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
> Y := [1, .54, -.41, -.99, -.65, .28, .96, .75, -.14, -.91, -.83, 0., .84, .91, .13, -.76];
> Piece2 := spline(X, Y, x, 2);
> fig3 := plot(Piece2, view = [0 .. 15, -1 .. 1]);
> fig4 := pointplot(X, Y);
> display(fig3, fig4);
> test := unapply(Piece2, x);
> test(15);

    test(15)=-0.76    #correct value!
 

 

My actual problem involves data from X=0 to X=300, and I have the same issue in this case.

Thanks.

Hey 

I'm trying to fit a spacecurve onto some points I have. 

I know, I can use Spline to do this in 2D, but it doesn't work in 3D.

What command(s) can I use to fit a spacecurve onto my points? 

Thanks in advance

well i know this blog is for maple problems and question but badly need your help guys. i want to know difference between cubic spline and cubic b-spline in simple words..

Question.doc

Can you make geometric figures that hold a particular area within a given perimeter of 12 matches

My attempt was to start at origin 0,0 and move up 1 unit (a,b) and then 1 unit up or to the right (c,d) etc ... until you enclose the required area (defined by linear spline) s.t. perimeter =12. but it doesn't really work

Hi friends. Am trying to plot a graph that shows the difference between cubic spline, crank 
nicolson and exact soution in 2d through this command but am not able to get it. 
Whereas table is mentioned below at t=0.05
x	cubic	 crank	  exact
0.05 0.0879 0.0855 0.0756
0.15 0.2514 0.2446 0.2194
0.25 0.3807 0.3708 0.3417
0.35 0.4625 0.4512 0.4305
0.45 0.4928 0.4815 0.4773
0.55 0.4747 0.4646 0.4733
0.65 0.4151 0.4609 0.4305

Hello everyone,

I have data in Excel sheet. I want to make the data smooth using cubic spline. 

My try can be found in the attached maple sheet. In my try, i was unable to see the

difference bewteen the exact data and the interpolated data. Please have a look and

help to smooth the given data in the attached Excel sheet.

Cubic_spline_smoothi.mw

I'm sure there are other Maple users who have done these things, but I'm in the early stages of learning Maple 15 after moving (up) from Mathcad.

1. How do I plot a simple wireframe map of the world?

2. If I have a dataset of gridded data where the data is in the form [latitude, longitude, number] how do I map that data to a grid on the globe and give it a height according to the magnitude of the [number]?

3. Is there a way to smooth the heights of each...

Hi folks,

I'm trying to find the x value of my data set that corresponds to 50% of area under the curve. I've used curvefitting and splines to generate a piecewise function, and am able to find the area under the curve between my two approximated zeros (as this is the only relevant region). I would greatly appreciate any help, as I've been pulling my hair out for a couple hours now!

 

Cheers!

hi

 

I have two sets of data namely x[i] and y[i], at first i want to pass a spline from all points (points are in 2d x-y diagram) and then extract some point from that. how can i write the suitable code  in maple? 

thanks

In a related question to this answer (http://www.mapleprimes.com/questions/129140-Surface-Fitting#comment129195). How can we take partial derivatives of the multivariable fitting function (in the example above, the function B(a,b)?
It seems like the package CurveFitting only allows to numerically evaluate the fitted function when we use ArrayInterpolation, but I assume deep in the code there must be an analytic ...

HI,

 

I measured some points. This points are plotted in a graph. Now I want to make a fit on this points.

I now that the fit-function has to be like this:

F = A + B1 x e^(-t/C1) + B2 x e^(-t/C2)

Problem: how can I create a fitting function like that?

 

The best thing I found is the "spline"-fit, but it doesn't work properly. It has to be one lonely function, not a summary of several functions (like spline).

Following Christopher2222 request, I wrote the following procedures for "exact" cubic Hermite spline interpolation,

p:=proc(x0,p0,m0,x1,p1,m1,x)
local t,d;
d:=x1-x0;
t:=(x-x0)/d;
p0+(d*m0+(3*(p1-p0)-d*(2*m0+m1)+(2*(p0-p1)+d*(m0+m1))*t)*t)*t
end:

pb:=proc(x0,p0,x1,p1,m1,x)
local t,d;
d:=x1-x0;
t:=(x-x0)/d;
p0+(2*(p1-p0)-d*m1+(p0-p1+d*m1)*t)*t
end:

pe:=proc(x0,p0,m0,x1,p1,x...
Page 1 of 1