Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'arrays of functions' topicStudent Support Forum > General > "arrays of functions"

Next Comment >Help | Reply To Topic
Author Comment/Response
04/26/11 5:12pm


I have a function which takes three variables, F[m,n,x], where m,n are integers, and x is real-valued. The function is pretty complicated in x, so to do numerical tasks, I would like to sample it and interpolate over x using a low-order polynomial; furthermore, I'd like to be able to do this for multiple values of m and n and stick the resulting interpolation functions in an array, so something like

G[m][n] = Interpolation[Table[{x,F[m,n,x]},{xmin,xmax,delta_x}]]

However, when I stick this in a Do loop running over some values of m and n, it seems as though all the functions G[m][n] are the same (i.e. G[m][n]-G[m'][n'] = 0 identically for all m,m', etc.) Is there something wrong with this assignment, or am I doing something stupid in my Do loop?


URL: ,

Subject (listing for 'arrays of functions')
Author Date Posted
arrays of functions robert 04/26/11 5:12pm
Re: arrays of functions yehuda ben-s... 04/27/11 12:22pm
Next Comment >Help | Reply To Topic