0

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?
enter image description here

john k
  • 6,268
  • 4
  • 55
  • 59

2 Answers2

2

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.

Origin
  • 2,009
  • 5
  • 19
  • 19
1

I don't know why but this syntax was what was needed:

plot(f, 1 .. 10)

john k
  • 6,268
  • 4
  • 55
  • 59