📜 ⬆️ ⬇️

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?

Video lecture




Presentation


Download the presentation in Wolfram Mathematica document format (1.3 MB).

(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:


Template objects in Wolfram Mathematica :


Articles in Russian


Articles directly related to the lesson:

Interesting articles that will allow you to make a first look at the possibilities of the Wolfram Language:



Course content


1. Overview of Wolfram Mathematica and Wolfram Cloud systems .

2. Programming language Wolfram Language (work in Mathematica 10):

2.1. Introduction to the Wolfram Language, its features. The main difficulties of novice users. Working with the Mathematica interface and its capabilities — a predictive interface, a free input form, and others.

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).

Source: https://habr.com/ru/post/267185/


All Articles