Items tagged with interpolation interpolation Tagged Items Feed

Hello Maple-Primers!

I am trying to evaluate a system at many different points.  I would like to include an interpolation function in this system, but have thusfar been unsuccessful.

Usually, I solve a system symbolically by using eliminate and unapply:

eq[1] := A = M^3;
eq[2] := C = A*2;
eq[3] := D = N+3;
eq[4] := B = piecewise(A = 0, 0,C);
eq[5] := E = B*D;
elimsol:=eliminate(convert(eq,list),[A,B,C,D,E])[1];

unappsol:=unapply(elimsol,[N,M]);

unappsol(1,2);
{A = 8, B = 16, C = 16, D = 4, E = 64} <--- great!

Now, I want to include an interpolation function in the system of equations.  They look like this (see worksheet for actual interpolation function):

B_interp := (W,T) -> CurveFitting:-ArrayInterpolation([FC_Map_W,FC_Map_T],FC_Map,Array(1 .. 1, 1 .. 1, 1 .. 2, [[[W, T]]]),method=linear);

eq[5] := E = B_interp(N,M);

Error, (in CurveFitting:-ArrayInterpolation) invalid input: coordinates of xvalues must be of type numeric <-- bad!

Anyone have any ideas?  I've tried to use polynomials, but I can't seem to get a fit close enough for my purposes.

Maple_2D_Interpolate_FC.mw

I have some data for a model in MapleSim that I would like to use a time look up table with.  I've found that the two options for interpolation are linear and 1st derivative, but the data was intended to be interpretted as piecewise constant.  Is there any way to acheive this option in MapleSim?

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.

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();

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

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 can help I will be more then happy to forward you the email.

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

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.

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

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

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.

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 yangtheary 65

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

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

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

Thanks in advance

interpolation.mw

1 2 Page 1 of 2