88k views

### Assign the results from a Solve to variable(s)

I understand Mathematica can't assign the results of a Solve to the unknowns because there may be more than 1 solution. How can I assign the 4 values of following result to variables? ...
126 views

### How to define a version of Table[] which localizes iteration variable by Module[]?

For reusable code it's good practice to use Module[] to localize iteration variables used by Table[], as explained by this post. ...
35 views

Example: ...
124 views

### Convert between string and expression representation of boxes

Boxes may be represented as expressions or as strings. How can I convert between the two forms? In particular, how can I convert from the string representation to the expression representation? ...
2k views

### How to find the name of the current function?

I would like to know the name of the current function from within that function. For example, consider the following code ...
3k views

### Mathematica Destructuring

Context I'm writing a function that look something like: ...
364 views

### Why does array packing in Table behave like this?

Consider the following example, which generate two identical arrays. Why sometimes the array is packed and sometimes it doesn't? And why they perform differently? Here the arrays are packed: ...
240 views

### Put local variables for Block in a variable

Is is possible to assign {x = 2, y = 3, z = 4} to a variable var so that one can write ...
2k views

### What is the complete list of valid FrontEnd Packet types?

In response to my question How can I get the unchanged Box form of an arbitrary expression? John Fultz answered with a method using the hilariously named ...
389 views

### Setting options of expressions similar to using SetOptions on objects

Introduction I often have the problem that in an expression, I want to change an option. If we are sure the option is not present, we could simply use ...
84 views

### Function of a function, both of a list of variables

I am trying to avoid dealing with long explicit lists of variables. What i do so far is the following: VarList={x_, y_}; ParList={x, y}; ValList={2, 3}; What ...
316 views

### How to take a part from a list without evaluating it

Consider I have a list l ...
3k views

### How to create symbols from strings and set values for them?

I am trying to convert a list of string names into symbols, which will then be used to store data. I have 24 files (where the name of each file is a member of the list mentioned above) that I need to ...
How to plot periodic function's graphic? For example, $f(t) = t$ when $-5<t<5$ and $f(t+10) = f(t)$. ...