Message Boards Message Boards

0
|
7271 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

I can't get a plot line of my function on Mathmatica. Please help

Posted 9 years ago
Amplitude[x_] := 
 1/2^0.5 (FresnelC[x + 0.645] - FresnelC[x - 0.645] + 
    i (FresnelS[x + 0.645] - FresnelS[x - 0.645]))
y[x_] := (Abs[Amplitude[x]])^2
Plot[y[x], {x, -10, 10}]

This is my input. Please can you find any mistakes in this

POSTED BY: Cameron Thompson
2 Replies

Hi Cameron,

just write for the imaginary unit I instead of i. Names of build in functions and constants always begin with a capital letter. For the same reason you should name own functions e.g. amplitude[] instead of Amplitude[].

Regards -- Henrik

POSTED BY: Henrik Schachner

I've managed to get it to work now, thank you

POSTED BY: Cameron Thompson
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