I am quite new to mathematica, and I simply want to know how to make a custom function, take another arbitrary function as an input.
I have attached code that shows what I am trying to accomplish (with output in the form of a list of lists). The last line of code is trying to be descriptive with reagrds to the roles that the different inputs should play, however it is only the "somefunction" part with its "variable" that I am mainly interested in knowing how it works.
Best regards.
sildeben[Sin[x], {x, 0, Pi, 2}]
Output:{{0., 0.}, {1.5708, 1.}, {3.14159, 0.}}
f[x_] := 3 x^3 - 6 x
sildeben[f[t], {t, -3, 3, 10}]
Output:{{-3., -63.}, {-2.4, -27.072}, {-1.8, -6.696}, {-1.2, 2.016}, {-0.6, 2.952}, {0., 0.}, {0.6, -2.952}, {1.2, -2.016}, {1.8, 6.696}, {2.4, 27.072}, {3., 63.}}
sildeben[somefunction_, {variable_, startvalue_, endvalue_, steps_}]