Message Boards Message Boards

0
|
6322 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

picking particular values of the function

Posted 10 years ago

Hi guys! Its probably a very simple question..

Suppose you have some function f(x).

ListPlot[Table[f, {x, 1, 5}]]  

gives you all values of the function for x=1,2,3,4,5 But, what is the syntax if I'd like to take particular values, say f(1) and f(3)?

Many thanks, D

POSTED BY: d m
4 Replies

Even better. Thanks David.

POSTED BY: Isaac Abraham
POSTED BY: David Reiss

For specific values, you may also try

f[x_]:=x^2(*or any other function*);
ListPlot[(*Function*) f[x](*replace x*)/. x ->(*with specific list of x values*){1, 3, 8, 2.5}]
POSTED BY: Isaac Abraham
Posted 10 years ago
POSTED BY: Mark Dooris
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract