Message Boards Message Boards

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

Why does Talbot[] always return 0?

Posted 6 years ago

Hello, I am newbie in Mathematica and Wolfram Language. The function Talbot shall return Re[h/(2IPi)*ans]] but returns always 0. What is my mistake in parameter passing?

regards - Leo

Attachments:
POSTED BY: Leo Baumann
4 Replies
Posted 6 years ago

Thanks - I have set gam, Tp and lap into one formula, and it works now.

regards - Leo

POSTED BY: Leo Baumann
Posted 6 years ago

Well the p's in your gam never get defined to be anything other than p. I believe gam is their original source.

POSTED BY: Kyle Martin
Posted 6 years ago

Thank You very much, that were 2 beginner's mistakes. - But I have one more problem. I think I did something wrong with the parameter passing, because Talbot[] doesn't enter numbers to List but expressions with p. - I am confused. :( - As You can see in List below in the notebook. thanks for help - regards - Leo

Attachments:
POSTED BY: Leo Baumann
Posted 6 years ago

You never really enter the For loop in Talbot. You begin your loop

For[k = 0, k == N, k++, expr]

with N = 64, while k = 0. Because the test k == N is False immediately, you never start the loop. Perhaps you meant k <= N?

Also, I would recommend avoid using N as a variable name in your programs or function definitions, because it is an already defined function in the Wolfram Language.

POSTED BY: Kyle Martin
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