I have 2 columns of x y data in data.txt like this:
0 0
1 1
2 4
3 9
4 16
5 25
Now I want to define a function f(x) where x is the first column and f(x) is the second column, and then be able to print values of this function like so:
f(2)
Which should give me 4.
How do I achieve this?