Mathematica Mathematica for Physics - problems

  • Thread starter Thread starter maverick280857
  • Start date Start date
  • Tags Tags
    Mathematica Physics
AI Thread Summary
A user is experiencing difficulties plotting examples from "Mathematica for Physics," specifically in chapter 9, problem 4, which involves a particle propagating toward a rectangular potential. Despite being able to plot simple functions, the user encounters blank plots when using the provided commands. Another participant identifies a minor syntax error in the user's code, suggesting that a comma should replace a semicolon in the definition of kRules to resolve the issue. This correction is expected to enable successful plotting of the intended graphs.
maverick280857
Messages
1,774
Reaction score
5
Mathematica for Physics -- problems

Hi

I'm trying to work out the solved examples in the book "Mathematica for Physics" [The code is available at http://library.wolfram.com/infocenter/Books/4539/]. But I am unable to plot anything despite using the plot commands given in the book.

Specifically, looking at ch9.nb (available from this link) -- problem 4 (particle propagating toward a rectangular potential), the commands given produce blank plots. I am able to plot simple functions, so I think the problem is with these commands.

I've attached my code with this thread. I'd be really grateful if someone could help me out with this.

Thanks.
 

Attachments

Physics news on Phys.org


Hi Maverick,

there's only one slight mistake in your Mathematica syntax. In your definition of kRules (4th cell in the nb) there should be a , (comma) instead of a ; (semicolon) between kW and kLR. Change that and your plot will look awesome... :smile:
 


Thanks :-)
 

Similar threads

Replies
5
Views
3K
Replies
4
Views
3K
Replies
2
Views
2K
Replies
16
Views
6K
Replies
22
Views
3K
Replies
5
Views
3K
Replies
7
Views
6K
Back
Top