Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Mathematica/Basics

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Mathematica code is fully-fledged programming language, complete with a proper syntax. It is very important to get the syntax right, or else the kernel will be unable to perform your task. Mathematica is notorious for a steep learning curve, and part of the reason for this is the rigidity of the language. The best way to learn Mathematica is to acquaint yourself thoroughly with the basic aspects of the code's structure before attempting complex tasks. This page will provide a condensed overview of the basics of the Mathematica language. Links will be provided where necessary to more detailed explanations. Basic Structure of the Language Just as the smallest unit of the English language that still makes semantic sense is the word, the smallest unit of the Mathematica language is the object. Whenever you write some input, Mathematica first deconstructs this into a tree of objects and then interprets it. There are various types of token in Mathematica: Type of tokenExamplesUseSymbola, abc, α, αβγRepresents an objectString"a", "abc", "αβγ"Holds a fixed textual contentNumber1, 12.34, 2^10Holds a fixed numerical valueOperators+, -, *, /Represents processes to perform on tokensComment(*some text here*)Holds notes that are not to be used by the kernel Any expression in Mathematica can then be nested functions of the form head[e1,e2,...] where head must be a Symbol and ei can be any of the supported object types or another function.