Message Boards Message Boards

0
|
3222 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

"If" works not as expected under Sum or Table

Posted 10 years ago

Here's an example: Table[If[j != i, 1/(j - i), 0], {i, 1, 5}]

It produces a result where i is not assigned a value and left as i. How can I make it work?

I found the way out: I must put Evaluate[1/(j - i)]

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