# Interpolating Function inside of NDSolve

I have a problem and it seems to be connected to an Interpolating function inside of an NDSolve command. The resistivity[x] function inside the NDSolve command is an interpolation of measurement data. The code works fine with an ordinary function instead of the interpolating function. When I run the code, it does not give an error, but no results are displayed either. Does anybody know what the problem is?

The code is:

xydataplot = Reap[
For[i = 1, i <= n, i++,
J = i j;
s =
NDSolve[{y'[x] == (resistivity[y[x]]  J^2)/nC
- alpha/nC (-T + y[x]), y[0] == T}, y, {x, 0, t}];
Te = y[t] /. s;
resis2 = resistivity[Te];
efeld = J resis2;
Sow[efeld];
Sow[J];
];
][[2, 1]]~Partition~2;

-
Can you please fix the code you have used in your question? It should be a minimal example which works and shows the issue you are experiencing. –  halirutan Aug 4 '13 at 21:28

Try to redefine your resistivity functions as
resistivity[in_?NumericQ] := Evaluate[ListInterpolation[yourData]];