The course "Basics of effective work with Wolfram technologies". Lesson 2.2: Defining Functions, Working with Lists, Template Expressions, and Associations
Content
Lists ⋅⋅⋅ List {...} and List function [...] ⋅⋅⋅ “Natural” list display ⋅⋅⋅ Ways to generate lists ⋅⋅⋅ Indexing items and some numerical characteristics of the list. Function Length and Depth ⋅⋅⋅ Isolation of elements occupying certain places in the list using the Part function ([[...]]) ⋅⋅⋅ Redesignation of list items ⋅⋅⋅ Generating a list using the Table function ⋅⋅⋅ Generating a list of numbers using the Range function Associations ⋅⋅⋅ Setting an association and working with it ⋅⋅⋅ Dataset - Wolfram Language Database Format Pattern Expressions ⋅⋅⋅ Introduction to templates Basic object templates: Blank (_), BlankSequence (__), BlankNullSequence (___) ⋅⋅⋅ What can be done using templates? Cases function ⋅⋅⋅ Definition of the type of expression in the template ⋅⋅⋅ Imposing restrictions on patterns using the Condition (/;), PatternTest (?), Except , and applying test functions ⋅⋅⋅ Creating templates that have an alternative choice using the Alternatives (|) function Functions ⋅⋅⋅ Using deferred assignment SetDelayed (: =) ⋅⋅⋅ Using absolute assignment Set (=) ⋅⋅⋅ Setting a function that remembers the values it already found and the recurrent function ⋅⋅⋅ Attributes of functions and functions Attributes , SetAttributes , ClearAttributes , Protect , Unprotect to work with them Pure functions ⋅⋅⋅ Using the Function Function (&) ⋅⋅⋅ Where are the pure functions used?
(If you do not have Wolfram Mathematica , you can download a fully functional trial version . You can also create a free account in Wolfram Programming Cloud). ')
Some examples of slides:
Additional materials for the lesson
Video
3 | Assigning values to variables and defining functions:
4 | Cleaning variables and functions:
5 | Application of the function to each element of the list (vector, matrix, etc.):
6 | Work with clean features:
7 | Options Options:
8 | Lists and their creation:
9 | Select items from a list or expression:
10 | Combining lists:
11 | Modify, add and delete list items:
12 | Grouping list items:
13 | Lists as sets:
14 | Lists as vectors and matrices, elements of linear algebra:
2.2. Setting functions, working with lists, template expressions and associations.
2.3. Creating visualizations.
2.4. Creating interactive objects, working with controls, creating user interfaces.
2.5. Import, export, data processing, files, images, sound, web pages. Working with the API of web resources on the example of the VKontakte API, as well as working with built-in ways of working with the API of Facebook, Twitter, Instagram, etc.
2.6. Work with built-in supervised Wolfram databases, integration with Wolfram | Alpha.
3. Working with the Wolfram Cloud: creating a direct API, input form, CloudCDF, etc.
4. CDF technology - instant integration of interactive objects created in Mathematica into web pages, subtleties. Using ready-made interactive objects from the Wolfram Demonstrations Project site in their projects and changing them. Real examples and business applications.
5. Working with Wolfram Language and Mathematica , pre-installed and free on the Raspberry Pi (with the Raspbian operating system).