RE: Inverse Interpolating Functions
- To: mathgroup at smc.vnet.net
- Subject: [mg29249] RE: Inverse Interpolating Functions
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Fri, 8 Jun 2001 04:15:35 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I thought I tested my earlier version of InverseInterpolatingFunction. I now see that it doesn't work but Dave managed to fix it. I think the implementation below is a little nicer than the last version Dave sent. InverseInterpolatingFunction[ f_InterpolatingFunction?(Less @@ #[[4, 2]] & )] := InterpolatingFunction[ {{ f[[4, 2, 1]], f[[4, 2, -1]] }}, f[[2]], {f[[4, 2]]}, {f[[4, 1]], f[[3, 1]]} ] InverseInterpolatingFunction[ f_InterpolatingFunction?(Greater @@ #[[4, 2]] &)] := InterpolatingFunction[ {{ f[[4, 2, -1]], f[[4, 2, 1]] }}, f[[2]], {Reverse[f[[4, 2]]]}, {f[[4, 1]], Reverse[f[[3, 1]]]} ] ----- Ted Ersek Download Mathematica tips, tricks from http://www.verbeia.com/mathematica/tips/Tricks.html