这是第一个回答(Faysal Aberkane):
Here's a collection of resources that I started on Mathgroup (A collection of Mathematica learning resources ) and updated here at StackOverflow. As this site is dedicated to Mathematica it makes more sense to maintain it here. This represents a huge amount of information; of course it's not exhaustive so feel free to improve it! Also, don't hesitate to share it and suggest other interesting links! Remember, you can always search the online Documentation Center of Mathematica, that is identical to the built-in help of the latest software version.
Links to more advanced aspects of the program that you can start to appreciate once you understand the basics are provided in separate answers (below) as this post became too large.
Introduction
- If you're just beginning try to have a look at these videos.
Mathematica Basics, Elementary Programming in Mathematica
Hands-on Start to Mathematica
Several introductory videos by Jon McLoone
and many other Video introductions and tutorials from the official Wolfram website - Is it necessary to have a prior computational background or is it possible to learn Mathematica as a first programming language?
- What are the most common pitfalls awaiting new users?
- How To-s: full solutions for particular tasks from the online documentation
- Easy-to-understand animations explaining common Mathematica functions
- Sal Mangano's videos for using pure functions,
Part
and patterns - Introductory videos of various applications of Mathematica
- What is the best Mathematica tutorial for young people?
Basic advices for people new to Mathematica
Functional styleAvoid iterative programming using loops like
For
or Do
, use instead functional programming functions Map
, Scan
, MapThread
, Fold
, FoldList
, ... and pure functions. This makes the code cleaner and faster. - Functional Programming, Functional Programming: Quick Start
- Pure functions
What does # mean in Mathematica? - Alternatives to procedural loops and iterating over lists in Mathematica
- An example: Programming a numerical method in the functional style
- Something not easy to guess alone at the beginning: if you have
x={1,2}
andy={3,4}
, doingTranspose[{x,y}]
or{x,y}
ESC tr ESC in the front end will produce{{1,3},{2,4}}
(format compatible withListPlot
). This animation helps understand why. - You can also use the second argument of
Transpose
to reorder the indices of a multidimensional list. - Don't forget to regularly control the output of the lists you generate using
Dimensions
.
@
, &
, ##
, /@
, /.
, etc.)- Operator Input Forms
- It may happen that you are not sure about which shorthand expression
will get executed first, in this case test the correctness of your
input using something like
Hold[inputExpression]//FullForm
- Getting help: Execute
?Map
for example for a short description of a function, or press F1 on a function name for more details and examples about it. You can solve many problems by adapting examples to your needs. - Auto-completion: Start typing the name of a function and (in Mathematica 9+) select from the pop-up auto-completion menu, or press Ctrl+k to get a list of functions which names start with what has already been entered. Once the name of the function is written completely press Ctrl+Shift+k (on Mac, Cmd+k) to get a list of its arguments.
- Function templates: In Mathematica 9, after typing a function name, press Ctrl+Shift+k (on Mac, Cmd+Shift+k) and click on the desired form from the pop-up menu to insert a template with named placeholders for the arguments.
Other useful shortcuts are described in the post Using the Mathematica front-end efficiently for editing notebooks. - Use palettes in the Palettes menu especially when you're beginning.
- In Mathematica 8, use the natural input capability of Wolfram Alpha, for example type "= graph 2 x + 1 between 0 and 3" without the quotes and see the command associated with the result.
Tutorials
- Fundamentals of Mathematica Programming (by Richard Gaylord, great tutorial for an overview of the logic behind Mathematica: patterns)
- Tutorial Collection by WRI (lots of extra documentation and examples, available as free PDFs, also available and up-to-date in Help > Virtual Book in Mathematica).
- Programming Paradigms via Mathematica (A First Course)
- http://library.wolfram.com/infocenter/Conferences/300/ (Mathematica tutorial)
- http://bmia.bmt.tue.nl/Software/Downloads/Campus/TrainingMathematicaEnglish.zip
http://bmia.bmt.tue.nl/Software/Mathematica/Tutorials/index.html - A problem centered approach
- A beginner's guide to Mathematica
- http://math.sduhsd.net/MathematiClub/tutorials.htm
- http://www.austincc.edu/mmcguff/mathematica/
- http://www.mtholyoke.edu/courses/hnichols/phys303/
- http://www.apam.columbia.edu/courses/ap1601y/ (Introduction to Computational Mathematics and Physics)
- http://ftp.physics.uwa.edu.au/pub/MATH2200/2012/Lectures/ (Applied Mathematics)
http://ftp.physics.uwa.edu.au/pub/MATH2200/2009/Lectures (path for some lectures in pdf) - http://en.wikibooks.org/wiki/Mathematica
- http://www.cs.purdue.edu/homes/ayg/CS590C/www/mathematica/math.html (Basic tutorial)
- http://stackoverflow.com/questions/4430998/mathematica-what-is-symbolic-programming (What is symbolic programming)
- http://www.cer.ethz.ch/resec/people/tsteger/Econ_Model_Math_1.pdf
- http://www.physics.umd.edu/enp/jjkelly (An introduction to Mathematica as well as some physics courses)
- Do you know of any web-based university course that is entirely Mathematica based?
- http://homepage.cem.itesm.mx/jose.luis.gomez/data/mathematica (Tutorials in spanish)
FAQ
- http://12000.org/my_notes/faq/mma_notes/MMA.htm (FAQ)
- http://stackoverflow.com/questions/tagged/mathematica?sort=faq&pagesize=15 (FAQ on StackOverflow)
- http://mathematica.stackexchange.com/questions?sort=faq (FAQ on this site)
- http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=FAQs
- http://library.wolfram.com/conferences/conference98/Lichtblau/SymbolicFAQ.nb (Symbolic FAQ)
Books
- Stephen Wolfram's The Mathematica Book (online, version 5.2), available for free
- Mathematica programming: an advanced introduction (online) by Leonid Shifrin, available for free
- Tutorial Collection by WRI (lots of extra documentation and examples, available as free pdfs, also available and up-to-date in
Help > Virtual Book
in Mathematica). - Mathematica Cookbook by Sal Mangano (O'Reilly, 2010)
- Mathematica in Action by Stan Wagon (Springer, 2010)
- Mathematica: A Problem-Centered Approach by Roozbeh Hazrat (Springer, 2010)
- Mathematica Navigator by Heikki Ruskeepaa (Academic Press, 2009)
- The Mathematica GuideBooks (for Programming, Numerics, Graphics, Symbolics) by Michael Trott (Springer, 2004-2005)
- An introduction to programming with Mathematica by Paul R. Wellin, Richard J. Gaylord and Samuel N. Kamin (Cambridge University Press, 2005); contains an example of Domain Specific Language (DSL) creation.
- Mastering Mathematica by John W. Gray (Academic Press, 1997)
- Programming in Mathematica by Roman Maeder (Addison-Wesley Professional, 1997)
- Programming with Mathematica®: An Introduction by Paul Wellin (Cambridge University Press, 2013)
- Power Programming With Mathematica: The Kernel, by David B. Wagner (Mcgraw-Hill, 1997), out of print but scanned copy available here.
- http://blog.wolfram.com/2014/01/10/read-up-on-mathematica-in-many-subjects
Wolfram Websites
Learn- http://www.wolfram.com/broadcast/
- http://www.wolfram.com/training/courses (Online video courses, most are free)
http://www.wolfram.com/training/special-event/ (Links to videos of past conferences) - Slides of seminars
- http://www.youtube.com/user/WolframResearch
- http://demonstrations.wolfram.com
- How To-s
- http://www.wolfram.com/mathematica/new-in-8
http://www.wolfram.com/mathematica/new-in-9 - A plot gallery for Mathematica 9
- http://www.wolfram.com/mathematica/resources
- http://library.wolfram.com/ (Great amount of resources here)
- http://support.wolfram.com/kb/topic/mathematica (Knowledge base)
- http://www.mathematica-journal.com
- Help
Help > Virtual Book - http://www.wolfram.com/support/learn/
- http://www.wolfram.com/books/
- http://reference.wolfram.com
- ++Mathematica http://reference.wolfram.com/language
- http://community.wolfram.com
- http://blog.wolfram.com
- http://blog.wolframalpha.com
- http://blog.stephenwolfram.com
- http://twitter.com/#!/mathematicatip
- http://www.mathematica25.com
SMP
http://blog.stephenwolfram.com/2013/06/there-was-a-time-before-mathematica http://blog.stephenwolfram.com/data/uploads/2013/06/SMPHandbook.pdf - http://www.wolframalpha.com
- Wolfram Science: the official site of Stephen Wolfram's New Kind of Science
NKS forum
Lecture notes from NKS summer schools
Programs from the notes
Demonstrations - http://computerbasedmath.org/
- http://education.wolfram.com (Some interactive basic math courses, useful for curious young people)
- http://www.wolfram.com/webresources.html (other Mathematica related sites)
- http://www.wolfram.com/events/virtual-conference/spring-2013
- http://www.wolfram.com/events/virtual-conference/2012
- http://www.wolfram.com/events/virtual-conference/2011
- http://www.wolfram.com/events/techconf2010/competition.html
- http://www.wolfram.com/events/technology-conference/2011/one-liners.html
- http://www.wolfram.com/training/special-event/mathematica-experts-live-one-liner-competition-2012
- 2013, http://www.wolfram.com/events/technology-conference/2013
- 2012, http://www.wolfram.com/events/technology-conference/2012
- 2011, http://www.wolfram.com/events/technology-conference/2011
- 2010, http://www.wolfram.com/events/techconf2010
- 2009, 2007, 2006, 2005, 2004, 2003, 2001, 1999, 1998, 1997, 1994, 1992
- http://library.wolfram.com/infocenter/Conferences/
Blogs
- http://mathematica.blogoverflow.com/
- http://mathematicacookbook.com/ (Blog of Mathematica Cookbook by Sal Mangano)
- http://mathematica-bits.blogspot.com/ (Blog of Yaroslav Bulatov dedicated to graph theory)
- http://12000.org (Blog of Nasser M. Abbasi)
- http://blog.matthen.com/ (Various interesting demos by Matt Henderson)
- http://ibnhconsulting.blogspot.co.uk (Blog of Mike Honeychurch)
- http://textanddatamining.blogspot.com/ (Blog about data mining in texts)
- http://shuisman.com (Blog partly about Mathematica)
- http://mathgis.blogspot.com/ (Lunchtime playground)
- http://mathematics-diary.blogspot.com (Blog of Nilo de Roock)
- http://www.walkingrandomly.com (Blog about scientific programming languages)
- http://rip94550.wordpress.com/ (Rip’s Applied Mathematics Blog, Mathematica is used to demonstrate various concepts of graduate level)
- http://mathematica-guide.blogspot.co.uk/ (Blog of Kris Carlson)
I liked this post: Functional-Procedural Fusion, this function is useful for this style of programming: MapEach[function_]:=(function/@#)& (for example: {1,2}//MapEach[2 #&]) - http://mathematicanews.blogspot.co.uk/
Personal websites
- http://math.sduhsd.net/MathematiClub/ (Games, various interesting notebooks)
- http://www.theodoregray.com/BrainRot/ (Conversation with Theodore Gray one of the historical developer of Mathematica)
- http://www.dbaileyconsultancy.co.uk/ (Super Widget Package, can be interesting, but using Dynamic with built-in Mathematica GUI components is now easier)
- http://www.verbeia.com/mathematica/code.html (Various interesting links to other packages)
- http://www.mathematica-users.org (Mathematica users wiki)
- http://katlas.org/wiki/Main_Page (Knot Atlas, package available)
- http://www.weber-und-partner.com/resources (Some applications to mathematical finance, package working as an interface to Quantlib)
- http://home.comcast.net/~djmpark/Mathematica.html (Site of David Park, Expression manipulation and some interesting packages)
- http://www.mathestate.com (Site about finance, with some links to demonstrations)
- http://library.wolfram.com/infocenter/Conferences/8073/ (A formal approach for modeling and simulation)
- http://www.bugman123.com/ (Paul Nylander)
- http://vimeo.com/groups/mathematica/videos (Some cool videos in 3D made with MM)
- http://pages.uoregon.edu/noeckel/MathematicaGraphics.html (Creating an Post-Processing Mathematica Graphics (on Mac OS X))
- http://www.lauschkeconsulting.net (Some interesting (non free) packages, like JavaTools which provides Mathematica links to Scala, C# and F#)
- http://www.oftenpaper.net/sierpinski.htm (Very cool pictures and math using Mathematica, code available)
- http://dev.ragfield.com/ (Useful Mathematica scripts among others. Connection with iTunes,Twitter, YouTube, Font outlines,Mapping GPS Data are some of them)
- http://www.wright.edu/~richard.mercer/Calculus/Lab/Download/index.html (Various notebooks about mathematics)
- https://sites.google.com/site/calcuplus/ (Introductory calculus course with CDF demos)
- http://library.wolfram.com/infocenter/TechNotes/6111/ (Numerical analysis, code of a lot of common numerical methods)
- Having used Mathematica as a "gateway" language, where to from here?
- Online interpreters can be found here Online-REPs-and-REPLs in order to test ideas in a lot of different languages.
- This resource is very useful for common languages like Java, C++ or VBA http://www.java2s.com
C++ reference books - http://rosettacode.org/wiki/Mathematica (Several algorithms in Mathematica together with other languages)
- http://www.cheat-sheets.org (Cheat sheets for a lot of languages)
- Wikibooks, can be handy for a quick reference on many languages.
- The Archive of Interesting Code
- dGSD, a great tool for organizing your projects and knowledge (Based on TiddlyWiki, a wiki stored in a single html file).
- Alternatives to Mathematica
Forums
MathGroup- https://groups.google.com/group/comp.soft-sys.math.mathematica
http://www.mathkb.com/Uwe/Forums.aspx/mathematica/201107/1
http://forums.wolfram.com/mathgroup/
- Mathematica questions on StackOverflow
- Mathematica.StackExchange (look at "favorites" in the profiles of active users for reading past interesting answers)
- Mathematica questions on StackExchange: all questions tagged mathematica on the StackExchange network
Links to some packages
- What third-party packages do you use?
- http://www.xact.es/index.html (Open source tensor package suite)
also see this post Differential geometry add-ons for Mathematica and Tensor analysis - FeynRules by Neil D. Christensen, Claude Duhr & Benjamin Fuks (latest version: 1.6.0, package to calculate Feynman rules)
- Automatic physical units, by Jon McLoone (2010, available from the Wolfram Library Archive)
http://library.wolfram.com/infocenter/MathSource/7655/ - NCAlgebra (Non Commutative Algebra Package)
- Sym (Symmetry analysis of differential equations)
- Some packages written by Leonid Shifrin
http://www.mathprogramming-intro.org/additional_resources.html
https://gist.github.com/lshifr
- LevelScheme by Mark Caprio (latest version: 3.52, Sep 2011, for Mathematica 6 and higher)
- Presentations and other packages by David Park (latest version: 25 Aug 2011)
- A WorkLife Framework by Scientific Arts LLC (extendable and customizable toolset that broadens Mathematica's scope across many aspects of daily work)
- FeynArts by Thomas Hahn (latest version: 3.7, 27 Mar 2012, package for generation and visualization of Feynman diagrams and amplitudes)
- Writing and Publishing a Book with Mathematica by Paul R. Wellin (2005, available from the Wolfram Library Archive)
Useful non-free tools for development, deployment, distribution, linking, etc.
- Workbench by WRI, current version: 2 (official Mathematica IDE based on Eclipse, great for projects involving several packages and generating integrated documentation)
- webMathematica by WRI, current version: 3 ("Deploy high-powered applications as interactive websites")
- gridMathematica by WRI, current version: 8 ("Easily control CPUs and GPUs to solve large problems fast")
- SystemModeler by WRI, current version: 3. Integrated symbolic modelling platform.Some related links: MathModelicaPaper, ObjectMath, Modelica, OpenModelica
How to do System dynamics simulations / diagrams in Mathematica? - Finance Platform by WRI, current version: 1. Includes option pricing, risk analysis, enterprise system development, and interactive reporting
- Mathematica Applications and Add-Ons (all add-ons marketed via WRI, related to Mathematica)
- Mathematica Link for Excel by Episoft, Inc., current version: 3.5 (links Microsoft Excel with Mathematica)
My original post above became too big so I'm splitting it
in two posts. The tips and tricks section that I used to keep track of
interesting new posts mostly on this site was big so here it is.
Note the tags at the end of each question on this site in order to read related questions.
I'm further dividing this post. See my third answer on Advanced evaluation and patterns below.
Optional Values
Note the tags at the end of each question on this site in order to read related questions.
I'm further dividing this post. See my third answer on Advanced evaluation and patterns below.
Tips and tricks
Top posts- What are the most common pitfalls awaiting new users?
- Can one identify the design patterns of Mathematica?
- What is in your Mathematica Toolbag
- http://www.verbeia.com/mathematica/tips/Tricks.html (Ted Ersek's tricks)
http://library.wolfram.com/infocenter/MathSource/4557/ (Ted Ersek's tricks as notebooks) - http://web.ift.uib.no/~szhorvat/mmatricks.php (Szabolcs' tricks)
- http://www.verbeia.com/mathematica/tips/tips.html (Verbeia's tricks)
- http://www.nhn.ou.edu/~morrison/Mathematica/ (Tip sheets)
- As pointed out by Mr. Wizard, have a look at the available packages in your install directory for getting new ideas!
- Tricks of the trade in the Mathematica Journal
- How do I designate arguments in a nested map?
- Levels: how do they work?
- Elegant operations on matrix rows and columns
http://reference.wolfram.com/mathematica/tutorial/LinearAlgebraMatrixAndTensorOperations.html
- Performance tuning in Mathematica?
- http://blog.wolfram.com/2011/12/07/10-tips-for-writing-fast-mathematica-code
- Programming for speed
- Benchmarking expressions (timeAvg function)
Profiling from Mathematica - http://www.dbaileyconsultancy.co.uk/m_performance/m_performance.html
- http://library.wolfram.com/infocenter/Conferences/7005/ (Principles of efficient MM programs, tips for writing fast code)
- http://library.wolfram.com/infocenter/Conferences/320/ (Generally Efficient Numerics Programming in Mathematica)
- Writing Efficient Mathematica Code
- Dispatch tables
Using Mathematica's Dispatch
Efficiently extracting an array subset given a separate array
How to speed up calculations with large number of replacement rules? (Experimental`OptimizeExpression) - Alternatives to procedural loops and iterating over lists in Mathematica
Are there any cases when For[] loops are reasonable?
Alternatives to While Loops?
Is Table the only functional way to construct nested loops in Mathematica?
How to transform Do loop to more efficient codes?
Replace For-loop with functional code
Equivalent Nested Loop Structure - Evaluate while external command is being run
- Transferring a large amount of data in parallel calculations
Are built-in Mathematica functions already parallelized?
Does parallel programming use up large quantities of memory in Mathematica?
- Collecting Expressions during Evaluation
Reap and Sow can be used with StepMonitor - SelectEquivalents
(my personal favorite Mathematica function, basically it allows to
define classes of equivalence and apply a function on the elements of
each class, using Reap and Sow)
How would you do a PivotTable in Mathematica? - Reap and Sow can also be used for debugging, see for example how it's used in ShowIt
- How to collect result continuously (interruptible calculation) when running parallel calculations?
- How to compile effectively?
How well does Mathematica code exported to C compare to code directly written for C? (Note the function Experimental`OptimizeExpression) - Note the instruction (<< CompiledFunctionTools`; StringFreeQ[CompilePrint[cf], "MainEvaluate"]) to quickly verify that a compiled function doesn't need calls to external functions, available as from v8.
- http://reference.wolfram.com/mathematica/Compile/tutorial/Overview.html
- http://library.wolfram.com/infocenter/Conferences/7968/ (Effective Use of the Mathematica Compiler and Code Generation)
What kinds of uses of SymbolicC (introduced in Mathematica 8) do you foresee? Are there any neat examples already? - List of compilable functions
- Shaving the last 50 ms off NMinimize (Advanced tricks for a very fast Nelder-Mead optimizer)
Using Apply inside Compile
Removing calls to MainEvalute when using inlined compiled closures - JIT compilation
Implementing a function which generalizes the merging step in merge sort
A fast, robust DropWhile - Retaining and reusing a one-to-one mapping from a sort
- Is it possible to use Compile on a function with optional arguments?
- Compiling more functions
How can I compile this function
Compiling more functions that don't call MainEvaluate - Does Mathematica have a "MATLAB Builder" equivalent?
http://reference.wolfram.com/mathematica/CCodeGenerator/tutorial/CodeGeneration.html
http://reference.wolfram.com/mathematica/CCodeGenerator/ref/LibraryGenerate.html
- System interfaces and deployment
- Faster alternatives for DayOfWeek (Java)
- Minimal effort method for integrating C++ functions into Mathematica
Converting other C++ classes to MTensor in LibraryLink
How can I use shared libraries in LibraryLink code and ensure Mathematica will find them?
Using Boost with CreateLibrary
Write C/C++ programs calling Mathematica functions
Example program for calling Mathematica from C
Returning multiple results from a LibraryLink function
Calling Mathematica from Visual Studio - example
Librarylink made easier to use with C++11
Calling Mathematica from Visual Studio - example - Mathematica Functions from VBA
- Linking FORTRAN with Librarylink
- MatLink, link between Mathematica and Matlab
- http://library.wolfram.com/infocenter/TechNotes/391/ (Packed Arrays)
- What is a Mathematica packed array? (instruction for being warned when a packed array is unpacked)
Mathematica memory management for large arrays - Avoid mixing integers with reals in a list, which would unpack the list and slow computations. For example use 1. instead of 1 if you have to enter manually an entry in a list of reals.
- Isn't it possible to Pack a SparseArray?
- A debug utility to print or extract intermediate data from a program (ShowIt, a useful variant of Print)
- The clearest way to represent Mathematica's evaluation sequence
How do I evaluate only one step of an expression? - Debugging memory leaks
Profiling memory usage in Mathematica
Preventing Mathematica from eating up all your memory (not a bug but the info can be useful)
How to un-eat memory? - Using the Mathematica debugger, and other interesting possibilities
Debugging Mathematica Code - DebugTrace
- How to program a F::argx message?
How to abort on any message generated?
Best practices in error reporting
How to leave function unevaluated programmatically?
Setting up diagnostic error messages in large Mathematica projects
Dealing with errors and resuming the code after one
Interrupting package evaluation, handling error
Prepend Information to Warning Messages
Need help with exception handling
Error checking and trapping techniques with Throw and Catch
Exception/Error handling using returns codes - Wolfram Workbench has an integrated debugger and profiler. See here for posts about it on this site: http://mathematica.stackexchange.com/questions/tagged/workbench
Inspecting non-variable state from a breakpoint in Workbench - Mathematica Debuggability
- Automatically generating a dependency graph of an arbitrary Mathematica function?
Is there an analogue of the Variables command for general expressions?
- Data structures and efficient algorithms, from Daniel Lichtblau
Kd-list, Kd-tree (applied to Gröbner bases) - Expr Bag
Internal`Bag inside Compile
Efficiently collecting results inside a compiled function - Linked lists
Mathematica “linked lists” and performance
Merge-sort
Variant of the cutting-stock problem in Mathematica
The answer of Leonid is a reference on the topic: Can one identify the design patterns of Mathematica?
Searching linked lists that contain lists? - Efficient circular buffer?
- Efficient priority queues?
- How can one define a custom data object?
How to create strong types?
How to implement FittedModel like objects - Struct equivalent in Mathematica?
Implementing a dictionary data structure
Is there a method to enumerate the keys/values of System`Utilities`HashTable
A usage example in the answer of Oleksandr R. or in the answer to the post
How can you give a Module a context and have its local variables and Modules belong to that context?
What's fastest way of defining 10^5 down values? - Once more on object orientation in Mathematica: does it have to be so hard?
Builder pattern for complex objects construction - http://12000.org/my_notes/object_based_in_mathematica/v1.html (Interesting application of a struct/object like symbol to Manipulate)
- Question about designing a particular data structure
- Code Readability and Object-Oriented Code
- Polymorphism and the pattern-matcher
- How to perform a depth-first preorder traversal of an expression?
- How to perform a breadth-first traversal of an expression?
- Determining all possible traversals of a tree
- Uses for MapAll (//@)
- Can a Trie be implemented efficiently?
- Concatenate strings from different levels of list
Optional Values
- Functions with Options
- How can I create a function with optional arguments and options?
- Can a function be made to accept a variable amount of inputs?
- Dealing with nested options
- Evaluation of OptionValue[]
- Custom functions by delegating options in a specific way and using core functions (withOptionConfiguration)
- Specifying optional arguments with variables
- Is there any way to define pure functions with optional arguments?
Is it possible to separately call the default value of a variable which isn't at the end of the sequence? - Why doesn't Mathematica use uniform criteria for validating Options?
- Cases[data,Colon[key,_]] vs. Cases[data,key:_] toward XPath, XQuery
- Emulating R data frame getters with UpValues
Creating a R DataFrame like construct in Mathematica
How to achieve Set+Part like behaviour in custom Set function? - The gap between MapAt and ReplacePart for 2D data tables with headers
- Data Table Manipulation in Mathematica
Data Table Manipulation in Mathematica: Step 2
How can a big table be treated as a database? - Path queries for tree-structured data
- Splitting up delimited data in lists
Partitioning with varying partition size (dynamicPartition)
Splitting a list by specifying section headers - Accessing list elements by name
- Where definitions are stored
- What is the distinction between DownValues, UpValues, SubValues, and OwnValues?
- Structure and interpretation of computer programs, Common Lisp The Language, On Lisp, Practical Common Lisp ...
- repl.it has an online interpreter for Scheme with some examples.
- Is there a Mathematica/Lisp link?
- Other functional languages : Scala, Haskell, Erlang, Clojure, Caml, F#, Maude ...
- FAQ on functional programming
- The answer of Leonid is a reference on the topic: Can one identify the design patterns of Mathematica?
- What does the construct f[x_] := f[x] = ... mean?
- Avoid repeated calls to Interpolation (Interesting answers and links about caching values and expressions)
- Function that caches when it returns unevaluated
- Why is there no PositionFunction in Mathematica?
- What are some useful, undocumented Mathematica functions?
- How can one find undocumented options or option values in Mathematica?
- What is the complete list of valid Front End Tokens?
- How do you convert a string containing a number in C scientific notation to a Mathematica number?
- What is the complete list of valid FrontEnd Packet types?
- How can I get the unchanged Box form of an arbitrary expression?
- How can I manipulate TemporalData?
- How to specify Mathematica as a programming language?
http://www.wolfram.com/mathematica/quick-revision-history.html
http://12000.org/my_notes/compare_mathematica/index.htm
How to get complete Documentation Center graph of guide pages?
Automated testing for compatibility with older Mathematica versions
Integrating notebooks to Mathematica's documentation center (Using Wolfram Workbench is easier for building a help but the answer is still interesting)
List of dangerous functions
What are all the named Mathematica styles? - Wolfram Workbench
How can I dynamically get a file whenever it is saved in Workbench?
How to work with Application Project files in Wolfram Workbench?
Managing formatted usage messages in Wolfram Workbench
What's the difference between these two ways of specifying dependent packages?
Creating cross-version compatible documentation with Workbench
Creating Mathematica packages
How to setup Team Development for a Mathematica project? - How does Plot work?
How to examine the structure of Graphics objects
Symbolic derivatives are being calculated numerically
Embed Code Into Image - Algorithm used by IsomorphicGraphQ
- How can I set up a versioning system within a notebook?
Is there a notebook autosave frequency configuration? - How to find a specific error message?
- The Joy of Tagging: Manipulating and Mining Notebooks in Mathematica
- Programmatic formatting for Mathematica code - possible?
Syntax highlighting for your own functions
Customizing syntax highlighting for private cell styles
Special Mathematica Cell to work with R code - Is it possible to improve Mathematica's auto-completion feature?
- Creating a notebook that has cells of a certain style password protected
Advanced typesetting
Resources for beautiful Mathematica Stylesheets - Adding a label to an expression result
How to fold output cells by default? - Open-source IntelliJIDEA plugin to support Mathematica development
- Automatic e-mail/text message when a calculation has finished?
- Simpler input for the new unit support
- Quality of random numbers
- Will Mathematica install and run on Raspberry Pi computer?
- Scheduling Mathematica scripts to run from a command line
- How to keep $FrontEnd options from resetting?
- How do I add new menuitems to menus?
- Got Manipulate? (Seminar slides)
Manipulate secrects revealed - Understanding CDF
- How to modularize custom controls for Manipulate?
http://reference.wolfram.com/mathematica/tutorial/AdvancedManipulateFunctionality.html (See last paragraph) - Question about collections of custom GUI controls for Mathematica
- http://www.12000.org/my_notes/event_driven_GUI_with_Manipulate/event_driven_manipulate.htm (Event driven GUI)
How to execute a function each time the slider is dragged?
How can I make controls have Button-like behaviour? - What is the equivalent of a prototypical Manipulate in lower level functions?
Selective evaluation of blocks of code in a Manipulate - How can I effectively performance-profile Dynamics?
- Mathematica Manipulate with macros AND variable number of controls (persistence desired)
- How to wrap this dynamic code inside a Manipulate?
- For[] or While[] can't be used inside Manipulate[]?
- Manipulate with explicit updates
- Wrapping EventHandler by Table
- Generalized input (look at Interpretation)
- What does None mean in a control specification for Manipulate?
- Using Refresh[..] with TrackedSymbols
- How to anchor a Pane's scroll position to the bottom?
- How to Initiate a queued evaluation from a Dynamic GUI without using a Button
- How to visualize/edit a big matrix as a table?
- Button evaluation inside DynamicModule
- Altering layout and sizing of Manipulate controls?
- Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module
- How can I use Dynamic to run a script when a new file is added to a directory?
- Using list elements in TrackedSymbols for Dynamic
- Evaluation order control
- How to make slider in/visible in Manipulate?
- How to visualize the structure of this dynamic programming code
- Slider resistance and Play-Pausing with Manipulate, TabView, and attempt an granular TrackedSymbols?
- Can I easily post images to this site directly from Mathematica? (Yes!)
- A palette of accumulated expertise
- For Sale! Three potentially useful palettes
- Learning Finance with Mathematica
- http://www.wolfram.com/events/chicago2011/nVidiaFinancePresentation.nb
- High-Performance Computing in Finance
- http://blog.wolfram.com/category/finance/
- How can you compute Itō Integrals with Mathematica?
Fast Simulations with Compile - Problem with Financial Data
- Growth theory with Mathematica
How to model Macroeconomic dynamics? - Making a Stock Options Database in Mathematica
- http://www.mathestate.com/
- What is the best way to create a correlation matrix heatmap with values?
- Correcting a correlation matrix to be positive semidefinite
- DistributionFitTest[] for custom distributions in Mathematica (How to define a custom probability distribution in Mathematica 8)
- Probability: proportion of 1000 random lists for x that contain the same nrs
- Filtering beat-to-beat heart rate data
- Time-series decomposition in Mathematica
- http://blog.wolfram.com/2013/02/01/the-ultimate-univariate-probability-distribution-explorer
- Mathematica code for hidden Markov models (HMM)
- Autoregressive distributed lag model
- Finding the likeliest path in a Markov process
- Open Excel file with Mathematica
Exporting data from Excel into Mathematica using clipboard - Tricks for making graphics for the math book
- Automating FTP upload within Mathematica?
- How to include Mathematica animation in a PowerPoint presentation?
- Calling external commands without showing command prompt on windows
- Mathematica Minecraft
How to create word clouds?
How can I use Mathematica's graph functions to cheat at Boggle?
Performance tuning for game solving (peg solitaire | senku)
Factorisation diagrams
Happy 2K prime question
Simulating Theatre puzzle
How can I generate this "domain coloring" plot?
Tiling a square
Generating visually pleasing circle packs - How to draw Fractal images of iteration functions on the Riemann sphere?
Generating a Sierpinski carpet
Speeding up this fractal-generating code - Explain a Mathematica winning one-liner
- How can this confetti code be improved to include shadows and gravity?
How to create animated snowfall? - xkcd-style graphs
xkcdConvert routines perform slower in Mathematica 9
http://blog.wolfram.com/2012/10/05/automating-xkcd-diagrams-transforming-serious-to-funny/ - How to improve the performance of solutions to Project Euler (#39)?
How to find palindromic numbers (Project Euler #4)? - Help find a bright object on Mars!
How can I find Waldo?
QR Code in shopping cart handle
Playing with Matrix falling code in Mathematica
Image segmentation and object separation in 3D using Mathematica - How to express trigonometric equation in terms of of given trigonometric function?
How do I introduce a new variable in a trigonometric equation?
Checking if two trigonometric expressions are equal - Efficiently generating n-D Gaussian random fields
Distribution of random points in 3D space to simulate the Crab Nebula - How to improve this code for solving the "Mr.S and Mr.P" puzzle?
Efficient code for the Ten True Sentences puzzle
Mathematica Implementations of the Random Forest algorithm
Soft-Match String Comparison
Gram Schmidt Process for Polynomials
How to determine the center and radius of a circle given three points in 3D?
Counting multiplications (complexity function)
Insert+ ,− ,× ,/ ,( ,) into123456789 to make it equal to100
Higher order SVD
How to check if a 2D point is in a polygon?
Find eigen energies of time-independent Schrödinger equation - List manipulations
Generating an ordered list of pairs of elements from ordered lists
How to select minimal subsets?
Delete duplicate elements from a list
Map a function across a list conditionally
Map-Thread-Through-Apply a list of functions onto a list of (lists of) values
Thread over list in different levels How can I make threading more flexible?
Transpose uneven lists
Thread over a nested list top to bottom until non-list elements are found
Optimising 2D binning code
Efficiently extracting an array subset given a separate array
Removing elements from a list which appear in another list
Quick multiple selections from a list
How to Derive Tuples Without Replacement
Efficiently finding the positions of a large list of targets in another, even larger list
Need help coding/creating a recursive list (FoldList)
Find continuous sequences inside a list
Instruct a Table to only evaluate until a condition is fulfilled
How do I replace a missing value in a column with the value immediately above throughout a table?
Sort+Union on a list
Ordering function with recognition of duplicates
Looking for a way to insert multiple elements into multiple positions simultaneously in a list
How to generalize and speed up this program?
How do I obtain an intersection of two or more list of lists conditioned on the first element of each sub-list?
Vlookup function as Excel in Mathematica
How to efficiently find positions of duplicates?
Partitioning a list of numbers the Mathematica way
How to get list of duplicates when using DeleteDuplicates?
How to pick increasing numbers from the list
How to replace an element in a list based on the value of the next element?
How to partition a list in a specific way
Nest , Fold ... is there an extension for more than 2 arguments?
List comprehension in Mathematica (similar to Python)
Select a repeated element in a list
Fast method for combining two lists
Third part of my collection of links, dedicated to advanced evaluation and pattern matching.
Advanced evaluation of expressions
A pattern is a way to quickly describe the structure of expressions and do computations on them, using
Advanced evaluation of expressions
- Non standard evaluation allows to work on the symbols of an expression before they get evaluated.
http://reference.wolfram.com/mathematica/tutorial/NonStandardEvaluation.html
Preventing evaluation of Mathematica expressions
Hold any argument
How can I hold UpValues but evaluate other expressions?
Symbolic computations with already assigned variables
How to pass a symbol name to a function with any of the Hold attributes?
Pure function with attributes of arbitrary number of arguments: Is it possible? - Mathematica Language Structure
- Mathematica Internals: A Tutorial
The evaluation process
http://reference.wolfram.com/mathematica/tutorial/Evaluation.html
http://reference.wolfram.com/mathematica/tutorial/TheStandardEvaluationProcedure.html
List manipulation to build a functional expression
How does Mathematica determine that an evaluation should be terminated? - What is the complete sequence of evaluations/transformations from submitting a cell to actual evaluation?
$PreRead, $Pre, $Post, $PrePrint - http://library.wolfram.com/conferences/devconf99/villegas/UnevaluatedExpressions.nb (Advanced resource about the evaluation process)
Update a function avoiding infinite recursion (Villegas-Gayley technique) - What are the use cases for different scoping constructs?
A speed comparison between Module, Block and With (Still, Module is what users use most of the time)
Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs
What does Internal`InheritedBlock do?
How safe is the use of Block and Internal`InheritedBlock
What are the scoping rules for function parameters shadowing System` symbols?
Constructing symbol definitions for With
Using With to scope over pure functions - What are some advanced uses for Block?
How to set Block local variables by code?
Safely nesting RuleDelayed - Metaprogramming in Mathematica
- Can one identify the design patterns of Mathematica?
- Replace inside Held expression
Injecting a sequence of expressions into a held expression
Is it possible to replicate the "magic" of OptionPatterns[] with DynamicModule's local variables?
How does MakeBoxes handle an n-ary operator?
How to inject an evaluated expression into a held expression? (Trott-Strzebonski in-place evaluation trick, RuleCondition)
How to pass a list of arguments into HoldAll
Returning an unevaluated expression with values substituted in
Passing a joined list of symbols for Module or Block to treat as its own local symbols - Expression parsing examples
Converting StringJoin to StringForm inside Hold
How to write a function to remove comments from a .m source file preserving formatting such as line wrapping reasonably?
How to write a function-defining function which stores the function arguments in a stack?
Is there a Mathematica API for the functions.wolfram site?
Function that counts the number of arguments of other functions
Using MatchQ (or other means) to parse an expression using sums of COS or SIN correctly Automatically generating a dependency graph of an arbitrary Mathematica function?
Programmatic formatting for Mathematica code - possible? - Functional style using lazy lists?
Tally repeated evaluation of function
File-backed lists/variables for handling large data (Lazy evaluation of streams)
Lazy lists of Tuples and Subsets - How to use pattern matching to assign values to Subscript[f,x_]?
- Implementing a safe ValueQ that does not evaluate its argument
- Convert an expression to a Function
Nested definition: How can I define a function with a passed-in expression? - How to avoid nested With[]?
LetL and Module efficiency - Do people actually use UpValues?
Upvalues, TagSet and UpSet, what's the difference, when should a use each?
How to implement dual numbers in Mathematica?
Make mathematica treate2i as numeric
how to differentiate formally? - Currying with Mathematica
Going full functional (Haskell style) - How to avoid returning a Null if there is no "else" condition in an If contruct (Vanishing function)
- SetAttributes[f,Flat]: Why the order dependence?
The Flat Attribute, Unevaluated and the Evaluation Process - Spelunking
What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools) - How does Return work?
What can be used as the second argument to Return on your own functions?
FoldWhile and FoldWhileList - Tail call optimization in Mathematica?
What tools can help in realizing tail recursion? - Elegant manipulation of the variables list
- Block attributes of Equal
- How to find the name of the current function
- Does pass-by-value affect the performance of function calls?
- Comparing Mathematica expressions like diff
- What is the fastest way to get a list of subexpressions and their positions?
- Resource management in Mathematica
- How to pass a list of arguments into HoldAll
Dynamic Programming with delayed evaluation - Multiplying expressions within a list of pure functions
Using Through to evaluate complex expressions - How to make a function like Set, but with a Block construct for the pattern names
Scoping in assigning a derivative - Getting a usable expression tree
- Call Functions From File Without Modifying Context (Sandbox)
- Functions vs. patterns
when is f@g not the same as f[g]?
When should I use Apply (or Function) and when @@ (or &)? - Constructing functions with variable number of output arguments
Alternative to overloading Set
A pattern is a way to quickly describe the structure of expressions and do computations on them, using
/.
or Cases
for example.- Some examples
Much more elaborate: a Texas Hold'em package by Sal Mangano - Rules, pattern and functions, one of the chapter of Leonid Shifrin's book.
Demistifying rules - Where in the documentation can I find a list of function argument types?
How can I type-check the arguments of a Mathematica function? - Using ?NumericQ to Affect Order of Evaluation
Is it possible to use the LevenbergMarquardt algorithm for fitting a black-box residual function? - Convert boolean test function to pattern?
- http://library.wolfram.com/infocenter/Conferences/6999/ (Inside the Mathematica pattern matcher)
- Is there an open source implementation of Mathematica-the-language? (Some interesting links to papers about pattern matching)
Mathador
Mathematica as a normal programming language
Mathematica for Computer Scientists - Mathematica Destructuring (Mr. Wizard also gives many links to interesting answers illustrating the same point)
- How to match a pattern with a pattern?
How to generally match, unify and merge patterns?
Pattern matching a pattern with patterns - Semantica, a package for using semantic patterns (f[(2 n_)] for example)
- How do I perform string matching and replacements?
Working with string patterns - Placement of Condition /; expressions
Using a PatternTest versus a Condition for pattern matching
Use of StringExpression as argument - Assessing argument type in set delayed function definitions
How to Combine Pattern Constraints and Default Values for Function Arguments - ForEach in Mathematica
- Why does the name of a pattern affect the result of a transformation rule?
- How to match expressions with a repeating pattern
- Is it possible to specify a context-sensitive, "depth-agnostic" rewrite rule?
- Change variables in differential expressions
- Transforming XML
Extract information from HTML using Mathematica - Replacements/Substitutions in Mathematica ($Assumptions)
- Position function not always retuning an answer even with no apparent problems
- How can I ensure that I am constructing patterns in the most efficient way possible?
- How can I find these patterns' signatures?
- replacement rules from a pattern and a matching expression
- Position of a pattern-matched part of an expression
- Patternmatching sets
- Using patterns in pure functions
- The difference between 0. and 0
- “Strange” behavior of Rule
- f[arg1, arg2,...,argN] vs. f[{arg1, arg2,...,argN}]
A function that accepts a pair or a list of pairs - Get a "step by step" evaluation in Mathematica
没有评论:
发表评论