Group Abstract Group Abstract

Message Boards Message Boards

Best way to fit/interpolate a list of 7D data?

Posted 9 years ago

I have a list of some physical quantity in 6 variables. Here is a part of the list:

List={{0, 0, 0, 0., 0., 0., 4.111895977}, {0, 0, 0, 0., 0., 0.785398, 
  4.607787965}, {0, 0, 0, 0., 0.0698132, 0., 4.111407160}, {0, 0, 0, 
  0., 0.0698132, 0.785398, 4.357618160}, {0, 0, 0, 0.174533, 0., 0., 
  4.592771471}, {0, 0, 0, 0.174533, 0., 0.785398, 4.119550626}, {0, 0,
   0, 0.174533, 0.0698132, 0., 4.580448801}, {0, 0, 0, 0.174533, 
  0.0698132, 0.785398, 3.993225360}, {0, 0, 0, 0.349066, 0., 0., 
  5.736786317}, {0, 0, 0, 0.349066, 0., 0.785398, 4.052547453}, {0, 0,
   0, 0.349066, 0.0698132, 0., 5.700944956}, {0, 0, 0, 0.349066, 
  0.0698132, 0.785398, 4.055131115}, {0, 0, 0, 0.523599, 0., 0., 
  6.615064609}, {0, 0, 0, 0.523599, 0., 0.785398, 4.178452520}, {0, 0,
   0, 0.523599, 0.0698132, 0., 6.564990242}, {0, 0, 0, 0.523599, 
  0.0698132, 0.785398, 4.207169777}, {0.09, 0., 0., 0., 0., 0., 
  0.2808961666}, {0.09, 0., 0., 0., 0., 0.785398, 
  0.4781796474}, {0.09, 0., 0.0698132, 0., 0.0698132, 0., 
  0.2957702531}, {0.09, 0., 0.0698132, 0., 0.0698132, 0.785398, 
  0.2991365099}, {0.09, 0.174533, 0., 0.174533, 0., 0., 
  0.6004583306}, {0.09, 0.174533, 0., 0.174533, 0., 0.785398, 
  0.2064655750}, {0.09, 0.174533, 0.0698132, 0.174533, 0.0698132, 0., 
  0.6113155697}, {0.09, 0.174533, 0.0698132, 0.174533, 0.0698132, 
  0.785398, 0.09722398462}, {0.09, 0.349066, 0., 0.349066, 0., 0., 
  1.468946665}, {0.09, 0.349066, 0., 0.349066, 0., 0.785398, 
  0.1517461042}, {0.09, 0.349066, 0.0698132, 0.349066, 0.0698132, 0., 
  1.459651339}, {0.09, 0.349066, 0.0698132, 0.349066, 0.0698132, 
  0.785398, 0.1309425809}, {0.09, 0.523599, 0., 0.523599, 0., 0., 
  2.107593061}, {0.09, 0.523599, 0., 0.523599, 0., 0.785398, 
  0.2087053436}, {0.09, 0.523599, 0.0698132, 0.523599, 0.0698132, 0., 
  2.090578121}, {0.09, 0.523599, 0.0698132, 0.523599, 0.0698132, 
  0.785398, 0.2441966506}}

I need to construct a function to represent this list. In this small subset the first variable takes two values (0, 0.09), the second and fourth take the values (0, 10 Degree, 20 Degree, 30 Degree), the third and fifth (0, 4 Degree) and the sixth variable take the values (0,45 Degree). Unfortunately ListInterpolation is not of help here because the variables do not make an array. Could someone please suggest the best way to create an interpolating or a fitting function in the 6 variables?

Thanks, eft

POSTED BY: Eft Rsd

Hi Eft,

I am quite unsure whether I understand your question correctly. Your data do make an array...

So let data (not List !) be your data, then an interpolation can be done like so:

dataFunc[\[FormalT]_] = Through[(Interpolation /@ Transpose[data])[\[FormalT]]]

or likewise e.g.:

dataFunc[\[FormalT]_] = Through[(Interpolation[#, InterpolationOrder -> 5] & /@ Transpose[data])[\[FormalT]]];

The variable range of the argument of dataFunc goes from 1 to Length[data] (and can be rescaled!). You can convince yourself about the correctness of the interpolation:

(dataFunc[#] - data[[#]]) & /@ Range[Length[data]]

Regards -- Henrik

POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard