RE: Interpolatingfunction
- To: mathgroup at smc.vnet.net
- Subject: [mg9737] RE: [mg9712] Interpolatingfunction
- From: Jean-Marie THOMAS <jmthomas at cybercable.tm.fr>
- Date: Tue, 25 Nov 1997 00:06:38 -0500
- Sender: owner-wri-mathgroup at wolfram.com
There are numerous answers to your question, depending on the data you are working on. Mind first the method you use for interpolation: Interpolation[data] comes with an option InterpolationOrder, which by default is set to Three, meaning it garanties the continuity of the interpolation function for the first and second derivative. You can use the following code as a start to your answer: i1=Interpolation[data1] i2=Interpolation[data2] g1=Plot[i1[x],Evaluate[Flatten[u,First[i1]],PlotStyle->RGBColor[1,0,0]] (*this will produce a red plot of the first interpolation function*) g2= Plot[i2[x],Evaluate[Flatten[u,First[i2]],PlotStyle->RGBColor[0,1,0]] (*this will produce a green plot of the second interpolation function*) if=FunctionInterpolation[Min[i1[u],i2[u]],Evaluate[Flatten[{u,Max[i1[[1, 1,1]],i2[[1,1,1]]],Min[i1[[1,1,2]],i2[[1,1,2]]]}]] fig=Plot[if[u],Evaluate[Flatten[u,First[if]]] Use the command Show[{g1,g2,fig}] to see the result, and you will realize you can get different answers and make a correct choice of the interpolation order. If you have no idea on how the interpolations functions were generated, and want a stricter result, you can generated the following interpolation: fs=Table[{i,Min[i1[i],i2[i]],{i,0,10,1/10}] where 1/10 is the size of the subinterval used to test the functions. The code for these examples is on my ftp site host: 195.132.8.82 password MathGroup Hope this helps! ----------------------------------------------- Jean-Marie THOMAS Conseil et Audit en Ingenierie de Calcul jmthomas at cybercable.tm.fr +33 (0)3 88 32 93 64 www.cybercable.tm.fr/~jmthomas ======================= -----Message d'origine----- De: Tama's Kalma'r-Nagy [SMTP:tk43 at cornell.edu] Date: vendredi 21 novembre 1997 07:32 A: mathgroup at smc.vnet.net Objet: [mg9712] Interpolatingfunction Hi, I have two InterpolatingFunction objects (f1,f2) on the same interval. I would like to get a third one which is Min(f1,f2). Any idea would be appreciated. Thanks, Tama's