Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Services & Resources
-----
 /
Services & Resources
*Wolfram Education Group Certified Training Classes
*Ordering
*Registration
*Customer Service Questions
*Technical Support
*Contact Information
*Training and Consulting
*Worldwide Resellers
*Information Request Form
*Mathematica Speaker Assistance Program
*For More Information
*Calendar of Events
*Support FAQs
*Documentation Center
*Wolfram Information Center
*MathGroup
*Student Support Forum
*The Mathematica Journal
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

Debugging Programs

Here are some suggestions for debugging Mathematica programs.

  • First, try to divide the program so that each command resides in a single cell. That way, you can evaluate each command and see the resulting output.

  • If you use an iterative command, like Table, you should try setting the iterative variable instead. For example, the command

    Table[f[x],{x,1,5}]

    becomes

    f[1]
    f[2]
    f[3]
    f[4]
    f[5]

  • The previous suggestion works well for function definitions using Module or Block.

  • You can use the Print command to look at values of variables inside nested commands.



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja]