8k views

### Assigning values to a list of variable names

As part of a calculation I need to do something like this Evaluate[{aaa, bbb, ccc}[[ index]]] = {1, 2, 3, 4, 5} so if index is ...
8k views

### Metaprogramming in Mathematica

Being functional, and having no "quotation", i.e. essentially treating data and programs semantically same, Mathematica seems naturally capable of doing metaprogramming. But could anyone construct a ...
1k views

### How to evaluate some parts of an expression inside Hold? [duplicate]

I want to return a Hold expression but with some parts pre-evaluated. The easiest way to explain this is probably through code example. Here is what I have ...
93 views

### Writing a procedure that invokes Manipulate[]

I would like to write a procedure with the signature: Foo[vars, params] which produces a Manipulate object. The procedure ...
149 views

### Generating compiled functions from inactive expressions

I am working on a project in which I need to dynamically generate CompiledFunctions from Inactive expressions. For example, I ...
779 views

### Constructing symbol definitions for With

I would like to be able to define two arrays, one containing symbol names and one containing the values of those symbols, for use in constructs such as With. For ...
773 views

### How can I change a list to a sequence without destroying nested list

I defined a function f like f[x___, y_] := something; and if xs and ...
179 views

### Order of Evaluate for Map

I would like to get a list of variable names as strings. For example, x = 1; y = 2; Map[SymbolName, Unevaluated /@ Unevaluated@{x, y}] {"x", "y"} This works ...
2k views

### Local variables

I'm trying to use Modules together with functions. tmp2 = x^2 + 1; f[y_] := Module[{x = 1}, Evaluate[y tmp2]] This works when ...
1k views

### Displaying a series obtained by evaluating a Taylor series

Description of problem I would like to use Mathematica to display the series obtained by substituting a value for $x$ in a Taylor series expansion. The terms of the series will be rational numbers, ...
873 views

### List manipulation to build a functional expression

Since Mathematica deals with Head[a, b] as an expression in this way The first Part of Head[a, b] is ...
376 views

### Evaluation in lambda function

If I have a function, that returns a function, for example: f[a_] := a^2 * # & then f[3] == 3^2 # & Is there a way ...
3k views

### Define function using variable list

I have a list of variables variables={a,b} and a list with values values={1,2}. I'd like to define a function using the ...