I've a problem. I defined a simple list and a function like below:
lst := {5, 10, 20}
f[m_] := lst[[Floor[m/10]]];
and drew a plot
Plot[f[x], {x, 10, 38}]
which works fine. But when calling LogPlot
LogPlot[f[x], {x, 10, 38}]
the following error appears before the plot
Part::pspec: "Part specification Floor[x/10] is neither a machine-sized integer nor a list of machine-sized integers"
Can anyone suggest me what's going on and how to deal with this error?
Thank you in advance!
Plot
first attempting a symbolic evaluation of the function. Can anyone find it? $\endgroup$LogPlot
can be turned off somehow, so that I can plot a function without having to specify the function arguments as done in the answer below. $\endgroup$