Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.7K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Assign numbers to functions in order?

Posted 6 years ago

I want to create code that assigns numbers to functions in order. I tried using Nestlist and it didn't work.

f[x_]:=x+1

actually,

f[1]

f[2]

f[3]

f[4].....

You can do this code one by one, but it need a lot of code to look from 1 to 100 all results. Is there an easy way to write?

POSTED BY: Keito Tanemura
3 Replies

Wow! Thank you for me to very simple code.

POSTED BY: Keito Tanemura

For this task there is a special function, try:

Array[f, 10]
POSTED BY: Henrik Schachner

I can find

Table[f[a], {a, 1, 10}]

It was very easy.Thank you.

POSTED BY: Keito Tanemura
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard