Get a pure function whose argument is a vector for a given multivariable scalar function
Contributed by:
E. Chan-López, Jorge Luis Ramos Castellano, Bhaskar Shukla & Alex Trounev
Examples
Basic Examples (2)
Define a function of two variables taking as input a vector of variables:
Apply the function:
Scope (2)
Use ScalarPureFunction to obtain a linear pure function of three variables and evaluate it at (1,-2,1):
Use ScalarPureFunction to obtain a transcendental pure function of three variables and evaluate it at (1,1,1):
Options (1)
IndexingMethod (1)
The IndexingMethod option allows specifying the method used to indexing elements of argvars in the ScalarPureFunction. By default, the method is set to "UseIndexed", which uses the Indexed function. Alternatively, can be set the option to "UsePart" to use the Part function. This option provides flexibility in choosing the preferred method of indexing elements of argvars within the ScalarPureFunction:
Applications (3)
Generate a Height Map (1)
To generate a height map for an imaginary mountain in the shape of a two-dimensional Gaussian function, use ScalarPureFunction to represent the height at each point of the mountain as follows:
Poincaré Sections of Hamiltonian Systems with Two Degrees of Freedom (2)
Use ScalarPureFunction in combination with ClickPoincarePlot2D to plot Poincaré sections of particle motion near a black hole horizon:
Poincaré sections of the Yang-Mills-Higgs system:
Publisher
Ramón Eduardo Chan López
Related Links
Requirements
Wolfram Language 13.0
(December 2021) or above
Version History
-
1.1.0
– 26 March 2025
-
1.0.0
– 20 March 2024
Related Resources