Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'making a function from imported data' topicStudent Support Forum > General > Archives > "making a function from imported data"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
yehuda ben-shimol
09/24/09 02:10am

Again the old porblem of the difference between = and :=
f[t_]:=Get["filenam"] should be interpreted as

"when you call f[any single argument] it gets the file "filename"
the right hand side of the definition is evaluated EACH TIME you call the left hand side.

what you need is to change the definition of f to
f[t_]=Get["filename"]
What happened here that at the stage of definition the right hand side is evaluated and the contents of the file enters as the value associated with f[t_]

yehuda

URL: ,

Subject (listing for 'making a function from imported data')
Author Date Posted
making a function from imported data mike 09/22/09 7:22pm
Re: making a function from imported data yehuda ben-s... 09/24/09 02:10am
< Previous CommentHelp | Reply To Comment | Reply To Topic