# Items tagged with interpolationinterpolation Tagged Items Feed

### interpolation in a procedure...

February 10 2014
2 3

Hi I have been trying to get the inperpolation of some values within a procedure without much success. Maybe someone in mapleprimes might know this already.

Basically what I am trying to do is to generate a matrix of values. The values of the columns 1 to 3 are just some values, but then I want column 4 to be the result of the interpolation of some values.

I got different errors such as:

Error, (in CurveFitting:-ArrayInterpolation) data must consist of real, floating point values

Anyway the procedure is shown below:

InterProc := proc ()

local i; global A, global variable1, global variable2;

A := Matrix(1 .. 4);

variable1 := [0, 100];

variable2 := [12, 20];

with(CurveFitting);

for i from 1 to 10 do

A(i, 1) := 3+i;

A(i, 2) := 2*i+A(i, 1);

A(i, 3) := A(i, 2)-1;

A(i, 4) := ArrayInterpolation(variable1, variable2, A(i, 1));

end do;

end proc;

InterProc();

### 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...
 1 2 Page 1 of 2
﻿