MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Transpose[ InterpolatingFunction, { n1, n2, ...} ]

Suppose I have a table, grid lines, InterpolatingFunction, and order
list as follows ...

lens = {6, 5, 4}
t = Table[i + j + k,
              {i,1, lens[[1]], 1},
              {j, 10, 10lens[[2]], 10},
              {k, 100, 100lens[[3]], 100}]
g = {Range[lens[[1]]], 10Range[lens[[2]]], 100Range[lens[[3]]]}
f = ListInterpolation[t, g]

Evaluate that and everything makes sense. Note that


Now let me transpose as follows ...

axisPosit = {3, 2, 1};
t2 = Transpose[t, axisPosit]
g2 = Part[g, axisPosit]
o2 = Part[o, axisPosit]
f2 = ListInterpolation[t2, g2, InterpolationOrder -> o2]

Again, no problems on evaluation. and


Trying all permutations of {1,2,3},... we see that the Dimensions and
Lengths do not always agree (and the corresponding ListInterpolation
must fail)

        Dimensions[t2 = Transpose[t, #]] == Map[Length, g2 = Part[g,
        Head[ListInterpolation[t2, g2]] === InterpolatingFunction} &,
    Permutations[Range[3]]] // MatrixForm

I think all of these cases should always be True. Is there a bug in
Transpose or am I confused?

I am trying to generalize Transpose to work on InterpolatingFunctions
including those where an N1-D InterpolatingFunction has data for only
N2-D dimensional hyperplanes where (0<=N2<=N1) (ie. where elements in
the list lens above can be =1). The function would be

myTranspose[ InterpolatingFunction, {n1, n2,  ...} ]

I intend to check that Sort[{n1, n2, ...}]==Range[N1]

Does anyone have any advice on how to accomplish this?

Thanks in advance!

  • Prev by Date: Re: Input Format
  • Next by Date: Re: LegendreP error (bug?) in Mathematica
  • Previous by thread: PlotMarkers misalignment in Mathematica 6.0.0
  • Next by thread: Automated documentation (like javadoc) for packages?