Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Export["test.dat", {#, Sin[#]} & /@ Range[0, 6.1, .01]];
- importFunction[fn_?FileExistsQ] := Module[{list},
- list = Import[fn, "Table"];
- Interpolation[list]
- ];
- importFunction2[fn_?FileExistsQ] := Module[{list},
- list = Import[fn, "Table"];
- list[[#]] &
- ];
- DeleteFile["test.dat"];
- testfun[.17]
- testfun2[18]
- Sin[.17]
- (* 0.169182 *)
- (* {0.17, 0.169182} *)
- (* 0.169182 *)
- ?testfun2
- testfun2=list$5210[[#1]]&
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement