Re: Interpolating data
- To: mathgroup at smc.vnet.net
- Subject: [mg64145] Re: Interpolating data
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Thu, 2 Feb 2006 00:07:12 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 2/1/06 at 4:34 AM, nogarybko at yahoo.com (Noga) wrote: >Hi, I'm trying to use the function "Interpolate" on a data of the >kind: >aaa = {{0, >3, -4.7202`}, {0, 7, 17.5902`}, {-20, 0, -0.418`}, {-10, 0, >17.3249`}, {0, >0, -9.9187`}, {5, 0, -46.7828`}, {17.5`, 0, -51.2055`}, {-15, 5, >-5.1367`}, { 7.5`, 5, 17.2389`}, {-17.5`, 10, -4.0567`}, {-5, 10, >17.4435`}, >{0, 10, >16.4173`}, {5, 10, 9.0035`}, {0, 12.5`, 9.4378`}, {0, 15, >15.1786`}, {0, 17.5`, 15.3475`}, {0, -2, -54.6795`}, {20, 0, \ >17.5902`}, {10, 0, 17.3249`}, {-5, 0, -9.9187`}}; >I couldn't understant why it can't do it. You haven't said what you tried, what you expected nor what response you got. So, my comments here are a *guess* as to what you are trying to do and what you may have done. If you tried Interpolate[aaa] I would expect Mathematica to return Interpolate[aaa] with aaa evaluated unless you have defined Interpolate. The built-in function is Interpolation. However, with this data Interpolation won't work either because of the dimensions of the data array. You can get an interpolating function with ListIngerpolation, i.e., ListInterpolation[aaa,InterpolationOrder->{3,2}] For this data, the InterpolationOrder->{3,2} is needed to avoid the warning message you will get without it. You need an array with at least 4 columns to use the default cubic interpolation. BTW. although ListInterpolation will create a InterpolatingFunction it isn't clear this will be what you want. ListInterpolation assumes the data consists of z values with the x,y coordinates specified by the position of each value. If your data is intended to be {x,y,z} triplets and you want to get an interpolated z value for given {x,y} values, ListInterpolation won't do what you want. -- To reply via email subtract one hundred and four