# Unexpected results from Interpolation function?

Posted 6 months ago
1050 Views
|
4 Replies
|
3 Total Likes
|
 Hello, I'm a new user of Wolfram Mathematica, I don't understand why the "interpolation" function is producing different results given the code below?
4 Replies
Sort By:
Posted 6 months ago
 Every time you call RandomReal it generates new values by default. If you need the same sample for both Inputnoise and i2 you can store the Table in a variable and then use it repeatedly.
Posted 6 months ago
 Apart from Gianluca's explanation, this expression cannot be evaluated i2 = Interpolation[ Table[RandomReal[NormalDistribution[1, Sqrt[w]]], 3*noisefreq]][(3*noisefreq - 1) t/3 + 1] Interpolation returns a function that takes a numerical value within its domain, and this is not a numerical value (3*noisefreq - 1) t/3 + 1 
Posted 6 months ago
 The symbolic variable {t} will be substituted for numeric value by other functions such as plot or Table, but thanks, I resolved the issue @Rohit Namjoshi
Posted 6 months ago
 Thanks, I totally overlooked that @Gianluca Gorni