Items tagged with interpolationinterpolation Tagged Items Feed

3d interpolation...

August 06 2013
2 1

I have a 3D data-points of the form x,y,z. What is the easiest way to get the interpolated value z=

Interpolation for scattered data...

June 27 2013
0 0

I am supposed to adjust the code my teacher gave us for a project. The only problem is I dont know anything about maple or much about what I am supposed to do. I tried copying and pasting the code but I couldn't.

The assignment says to adjust the code to incorporate variable window size. There is a place in the code where it says insert code here and the teacher said it shouldn't need more than like 8 lines of code.

If anybody thinks they they...

how to find explicit expression with maple...

April 12 2013
0 2

We want to fit

f(x) = a_0 + a_1 *x + a_2 * x^2 + ... + a_n * x^n

to the data (x_i,f(x_i)) for i = 0 ... n.

It will give rise to the following system

[ a_i ] = [A]^{-1} * [ f(x_i)].

Here [a_i] = [ a_1 a_2 a_3 ... a_n],

[A] = [ 1 x_0 x_0^2 ... x_0^n ; 1 x_1 x_1^2 ... x_1^n ; 1 x_2 x_2^2 ... x_2^n ; ... ; 1 x_n x_n^2 ... x_n^n]

and

[f(x_i)] = [f(x_0) f(x_1) f(x_2) ... f(x_n)].

Nonlinearfit problem...

April 02 2013
0 0

Good afternoon everbody,

I am trying to make a rational interpolation from the data of a function (values of the function for different points).
I tried to do it with the RationalInterpolation command but it requires too much time. Then I chose to solve the problem with the NonlinearFit command but the result varies a lot if I a change the basic function I want to approach and I always get a warning message: limiting numer of iterations reached.

Write a function in Maple...

January 16 2013
1 6

Hello Everybody!
I am working on an interesting problem right now. Please read it and let me know what you think.

Lets assume there is some function f(v) where v is argument-vector with fixed length. It is known, that the function is a rational type of function with integer coefficients from the vector v.

It is required to find analytic expression for this function.

In other words, we can compute...

Integrating numerically-defined function...

November 27 2012
0 4

I have several functions that cannot be integrated analytically but are to be used (repeatedly!) in further integrations. I have created a table of values of these integrals for a mesh of parameter values.   If I then use the ArrayInterpolation function to compute just one value at one point - it's very inefficient - takes lot's of time...

What is the optimal way of defining "InterpolatingFunction"  (in the language of Mathematica)?  Are...

Why cant maplesim solve this model?...

July 16 2012
0 0

Hi,

The model that i uploaded (EqQui.msim) has a component with severall output and 4 inputs, but 2 of the inputs (LgKph2o and Lgkpco2) depends on one of the outputs. The 2 interpolation tables transfor the output variable (temperature) in this two inputs. All components works fine independtly (first "model", the one on the top), but if i link the exit of both interpolation tables mapleSim say it cant solve a lot of variables.

partial derivatives of multivariate interpolation...

July 04 2012
0 3

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 ...

Function help me...

February 09 2012
0 1

Find the polynomial y=f(x) such that f(-6)=2400,f(-4)=432,f(-3)=120,f(-2)=16,f(-1)=0,f(0)=0,f(1)=-8,f(2)=0

Function from numbers...

February 07 2012
1 6

Hi everyone,

I am trying to build a function of dsolve/numeric solution which would not include procedures for defining the value of it.

First, I need to extract solution as a 2-d array, which will contain all evaluated points of solution.

Next, I want to define a function from this set of points (like interpolation).

Say, I have an array or list of numbers (2-d points).

Now comes the main question: is there a way to interpolate some...

Looking for a simpler and smaller interpolation fu...

January 12 2012
0 0

Hi all,

I have data which I want to give a simpler and a smaller interpolation function. Not necessary with Cubicspline as in the code attached (polynomial, exponential, etc..).

interpolation.mw

Join curves in a plot...

October 21 2011
0 2

Hi everyone.

I have calculated three functions which led to three curves in a plot. Since I need to join them so as to create just one curve, I ask you if there's a method, even if approximated. I've thought about an interpolation but I don't know if it's feasible.

Thank you very much.

Numerical Stability...

June 22 2011
0 0

Hi all,

I am having a very hard time with numerical stability. I am solving system of ode's (7-coupled ode's) using dsolve(stiff) and then using spline function for interpolation and finally solving system of pde's (2-coupled pde's) using pdsolve for one time step and solving all again for the next step. the solution is not stable and it requires very fine/small time step. Is there any procedure/method to improve the stability?

What is the stability criteria of dsolve...

"Exact" cubic Hermite spline...

May 21 2011 Maple
7 9

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...

data interpolation...

May 02 2011 Maple
10 1

There have been some recent posts about interpolating data.

Attached below is a worksheet that shows some possibilities, with the functionality centering on the CurveFitting:-ArrayInterpolation command.

This is quick summary of parts of a broader document which covers both 2-d and 3-d methods (for regular grids), where I've left out the higher-efficiency methods and instead roughed in some examples involving integration and differentiation.

I've elected not to follow the 3-d Example from the ArrayInterpolation command's help-page, although using a pre-formed grid is a very fast approach to obtain just an interpolated 3-d plot. I also prefer to use the plots:-surfdata command rather than the plots:-matrixplot command, since the former let's one get the axes' tickmarks correct for the x- and y-data ranges.

The scenario is that you have a grid of data points in two dimensions (x- and y, or P- and T-, or what have you).

For each point (ie, for each 2-d pair of values) you have an associated value (or height in z, say). Hence you actually have data points in 3-d space.

How you obtained the associated (z) values depends on your own particular data collection method, or your own program. How you got the data is irrelevant here. What matters is that you have the finite number of data values, and no other easy way to generate data values at more points (let alone data for arbitrary new points). Below, we'll just create the data (once, at the start) for this example using an entirely made-up formula.

The presumption is that you might wish to plot a smooth surface that connects the 3-d data.

But you might also wish to write some program which requires interpolated (z) values at some new (x,y) 2-d points.  And you do not yet know what these 2-d point pairs are. So a pre-formed Array of points  at which to interpolate may not suffice.

Instead of using a pre-formed Array of output points, we'll contruct a procedure named B which can be supplied with a new (x,y) 2-d output point and (if that point lies within the original range) return an interpolated (z) value.

This procedure B can also be plotted, using the usual plot3d comamnd. It won't plot quite as fast as would a pre-computed and pre-interpolated finer grid of (x,y) values, but it should plot nicely. And the surface can be made quite smooth, by merely increasing the number of plotted points using plot3d's usual numpoints option. (Maple does not currently do "adaptive" 3-d plotting, so there's also no advantage in that respect.) But B does solve the secondary task, of being able to compute for any subsequent (x,y) point.

We can even integrate and differentiate B numerically. Of course we should keep in mind that this is somewhat error prone, since on top of usual issues with numerical differentiation there is also fact that we make the choice of interpolation method! The entire interpolated surface will differ considerably according to whether a spline, cubic (or other) interpolating scheme is chosen!

We'll use P and T as the x- and y- grid points, below, since "a name is just a name" and our choice of variables is arbitarary.

plot_interp.mw

 1 2 Page 1 of 2
﻿