Mathematica Plots over Z in mathematica and maple

AI Thread Summary
To plot values of an integer-defined function in Mathematica, one effective method is to create a table of values and use the ListPlot function. For instance, defining a factorial function as F[n_] := n!, you can generate a list of values by mapping the function over a range, such as F/@Range[1,5]. This produces a list of function outputs that can be visualized with ListPlot. This approach is straightforward and ideal for beginners looking to visualize number theoretical functions in Mathematica.
axeae
Messages
70
Reaction score
0
im sort of new to using maple and mathematica for number theoretical functions, is there any way I can plot the values of an integer defined function in either of these programs? thanks
 
Physics news on Phys.org
There are probably numerous ways to do this in Mathematica (not familiar with Maple). The simplest I can think of right now is: make a table of the values you want and use ListPlot to display them.

For example

F[n_]:=n!
ListPlot[F/@Range[1,5]]

The first line defines your function (I suppose you already have that). In the second line, Range creates a list {1, 2, 3, 4, 5} and then maps each element to the function. The result is a list {F[1], F[2], ..., F[5]} which is then sent to ListPlot for display.

Hope that helps :)
 
Last edited:
thats perfect, thanks a lot
 
Back
Top