I am trying to graph the function f(x) = x mod 7
The graph should look like a bunch of spiked lines. Instead it is graphing a straight line f(x) = x
What am I doing wrong? This seems so basic. Is Maple Bugged?
The f you define is a procedure in terms of x. When maple gets plot(f(x),x=1..10)
, it first tries to evaluate f without filling in the numeric values of x. Your solution of plot(f,1..10)
is the correct way to plot a procedure, the first one is to plot a general formula. In plot(f,1..10)
Maple detects that you're plotting a procedure and fills in x correctly.