Message Boards Message Boards

0
|
3096 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Evaluate the final "test" in a “For” command?

Posted 5 years ago

Found this code in the literature that evidently worked in Version 7 of Mathematica evidenced by the published output. It now seems to ignore the final “test” in the “For” statement. Any ideas as to why? Attached it the code.

Attachments:
POSTED BY: Carroll Stroh
4 Replies

Problem solved!

enter image description here

You have used Curly brackets instead of Round brackets / parantheses in line

H[x_, t_] = (1 - t)*(g[x]) + t (f[x]);

An updated file is attached. Have fun!

Attachments:
POSTED BY: Jürgen Kanz

Is this the result you expect?

enter image description here

POSTED BY: Jürgen Kanz

This is the output I get as well. According to the published paper which I will attach, there is a second part for 3 iterations.

Attachments:
POSTED BY: Carroll Stroh

You would not believe how long I looked for the problem and never found it. Thanks a bunch.

POSTED BY: Carroll Stroh
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