# Tagged Questions

Questions about how Mathematica evaluates expressions, tracing evaluation (Trace*), handling expressions in unevaluated form (Hold*, Unevaluated), nonstandard evaluation, etc.

37 views

### Mathematica Not finding Eigenvectors? [duplicate]

I have the following matrix: mat = {{-60., 0., 2.1*10^-35 II + 2.1*10^-35 (-1. II + Istar), 2.1*10^-35 II + 2.1*10^-35 (-1. II - 4.7619*10^6/Istar)}, {-6.4*10^22 II - 6.4*10^22 (-1. II - ...
67 views

### Why doesn't Mathematica abort evaluation when I tell it to?

This frequently happens to me. I'll have some code, execute it, and realize it's taking a long time. My PC isn't frozen, and Mathematica itself isn't even frozen: I can select stuff in the notebook, ...
34 views

### Mathematica won't evaluate on the first run & problem with code highlight

When I start Mathematica, the first evaluation always takes forever even it's as simple as x = 2, and when I halt the evaluation with ...
132 views

### Evaluating summations involving Fibonacci numbers in terms of Fibonacci numbers

There are many summations involving Fibonacci numbers which Mathematica 10.4 is able to evaluate directly in terms of Fibonacci numbers. For example, Mathematica evaluates the summation given below as ...
50 views

### Chains of approximate numeric equalities

Mathematica considers two numbers equal if "at most their last seven binary digits" differ. For example: ...
58 views

### How to wait a Cell in a Notebook to be executed until another Notebook's Cell expressions executed?

I have two Notebooks and I call the second Notebook from the main but main Notebook's expressions continue executing. I want them to wait until the second Notebook's expressions execution is finished! ...
424 views

### Nothing not behaving as expected?

I was thinking that Nothing was doing the same job as the vanishing sequence ##&[]. Yet this exemple shows it doesn't. ...
32 views

### The problem encounterend while calling a sub notebook from the main notebook

I have two notebooks; one of them is the main notebook which will call the second notebook several times in a loop and inside this loop, matrix called as ALLB, defined in the main notebook, will get ...
133 views

### Multiplication non-deterministic?

I have two vectors of 134 elements each ($mu$, and $gt$). $mu$ contains Integers, and $gt$ contains machine precision Reals. I execute the following simple expression multiple times without changing ...
43 views

### How to use Set correctly

My codes are shown in the picture attached. I'm writing codes for numerical calculations frequently, and I think it looks neat and clear to organize input parameters in the form of table. For example,...
84 views

### How to define a function which takes another function as input in Module

Let $f$ be a function of $n$. I would like to define a function $A$ with module which takes $f[n]$ as input. So for example: ...
102 views

### Can evaluation show what was evaluated along with results? [duplicate]

After I write and evauate the following lines in Mathematica: a = 1 b = 2 x = a + b It will show only the result : 3. I want mathematica to show the following ...
39 views

### Evaluating a function after simplifying to avoid infinite expressions

My Poly[j_, s_] function simplifies to a polynomial for all j. So I defined a PolySim[j_, s_] = Simplify[Poly[j,s]] function. However, if I try to evaluate PolySim[j,0], since this is PolySim[j,0] = ...
124 views

### NIntegrate evaluates its 1st argument while it has the attribute HoldAll?

NIntegrate owns the attribute HoldAll: Attributes@NIntegrate (* {HoldAll, Protected} *) ...
41 views

### Using Replacement Rule on Part of List? [closed]

Why can't I use a replacement rule to replace a variable name standing in for the index of a list? For example: myList={1,2,3,4,5} myList[[index]]/.index->3 ...
115 views

### How to speed up my code for plotting purposes?

Below is my code in order to produce a numerical expression for the final function that needs to be plotted. I have tried to see the output of each successive expression by running the code and ...
80 views

### Generate assignment code to symbols from string

I want the function to take in string, then assign a value to its corresponding symbol. An implementation using ToExpression is ...
82 views

### Kernel randomly aborting

Bug introduced in 10.0 and fixed in 10.3 So after 2 days of trying to figure out what's going on, I figure I should post here as I don't have enough knowledge about the Mathematica evaluation ...
124 views

### How useful is $EvaluationEnvironment? Bug introduced in 10.0 and persisting through 10.4.1 A support case with the identification [CASE:3618534] was created. [...] I filed a report with our development team raising the issues [..... 2answers 157 views ### Is it possible to assign numbers generated in an Error-Message? If I have a differential equation of the form ... 1answer 39 views ### Replace argument of delayed function before it evaluates [duplicate] How should I use replace so that f[x_] := x^2 Replace[f[3], 3 -> 1] OUT = 9 evaluates to 1, instead of 9? This way, the replacement of the argument is done ... 1answer 111 views ### Evaluation leak from Dynamic in Button's action a = 1; Button["Print", a++] Button["Print", Dynamic[a++]] Button["Print", Dynamic[a++];] Button["Print", {Dynamic[a++]}] Dynamic @ a The second ... 1answer 34 views ### Forcing evaluation of LinearSolve [closed] I have a linear solve function: ls = LinearSolve[MatrixForm[Transpose[basisNScoeffs]]]; Which I then use to generate a table of solutions: ... 1answer 201 views ### Where does a package have to be loaded? I'm trying to solve a very tricky issue in my function. The function needs the NDSolveFEM framework. Here is a minimal example: ... 0answers 36 views ### Prevent infinite product from trying to evaluate? Consider an expression involving several infinite and non-infinite products, like ... 1answer 76 views ### Mapping over function's several parameters regions [closed] About this post: Mapping multiple parameters of a function to specific values I wonder if the parameters a and b have ranges ... 0answers 35 views ### Creating a non-zeta-ified sum The expression Sum[i^(-s), {i, 1, ∞}] evaluates to Zeta[s] But, of course, this is not strictly correct as ... 2answers 70 views ### How do I SetDelayed$Assumptions

For some reason, $Assumptions := (Print["y"]; x > 0) evaluates the RHS immediately. I have code in which$Assumptions ...
42 views

### Parallelization and efficiency improvement

Hey i am new to mathematica and at the moment i am writing some test code. It works but it is unrefined. I try to make it more efficient by using parallelization or other techniques. I wanted to ask ...
388 views

### Shell Emulation inside Mathematica

I am trying to create a Mathematica/shell syntax hybrid. I would like the following command wget -qO- "http://google.com/space line break\"" \$var to be ...
315 views

### Understanding evaluation and typesetting

Background So, one could be surprised by the fact that: Hold @ Grid[{{1, 2}}] (*or*) Hold @ Graphics @ Disk[] This issue and methods of prevention are ...
21 views

### How to make an expression in this case evaluated one step and stop there? [duplicate]

I wonder how to make Symbol@"m" evaluated once so that it becomes a symbol m which is ready to be assigned again. ...
55 views

### recursively structuring a multivariate numerical optimization

Suppose that I want to partition the unit interval [0..1] into four subintervals whose max length is as short as possible. I can ask Mathematica to: ...
111 views

### Evaluate pure function through round brackets

In have some matrices of pure functions or numbers which I multiply by other matrices or vectors. I would like the functions to be evaluated in the result, but all that I get is something like this: <...
89 views

### How can a function without an operator form be used in postfix form?

As an exercise, I was trying to convert the following Clojure code to Mathematica: ...
49 views

### How to understand the different output of two UnsetShared?

Update From technical support, Thank you for contacting Wolfram Technical Support. I understand that you are reporting an issue with UnsetShared deleting the shared variable after a second ...
34 views

### Delete Cell Inside of Module

I want to print a dynamic output while some code is running and then automatically delete it when when the output is done. PrintTemporary is not quite what I am looking for -- I want the output to be ...
114 views

### Strong glitch with Evaluate in Manipulate

I'm experiencing a strong evaluation problem for a Manipulate box and I can't find the best solution yet. Here's a MWE to show the glitch : ...
78 views

### Help on order of evaluation within plot function

it is my first time asking a question here so please let me know if there's anything I should be doing that I'm unaware of. I'm sure the answer to my question already exists on the site but I'm having ...
52 views

### Difference between Initialization Cell and Group

Is there a difference between setting a Cell or a Group of cells to be an Initialization Cell...
71 views

### Function Evaluation in Table [closed]

Apologies in advance: this is a really basic question, and I am sure it has been answered, but I don't know enough mathematica to even find the answer. I have a differential equation I want to solve....
43 views

I have tried modifying KeyEventTranslations.tr with code: ...
30 views

### Strange cell evaluation state

I have encountered a strange cell evaluation state (Shown in the image). It seems to be related with unknown variable a. What does this state means ? how it is different from simple error ?
46 views

### Optimization for iterating and plotting a matrix product and its elements?

I have an iterative matrix product of this type Since i didnt knew how to do it, I explicitly wrote the product as {Ayn + Bxn, Cyn + Dxn} and evaluated it with the NestList construct ...
71 views

### Calling functions defined inside Manipulate in other notebook?

I'm creating a notebook with a Manipulate and I'm trying to call/use a function from another notebook (I use Get for that), in ...
89 views

### Partial Function Evaluation [closed]

How can I evaluate only part of a stack of function calls? In particular, given f[x_,y_,z_]=x+y+z;, say, I'd like to define a function ...
147 views

### Multiple Plots inside a Manipulate with different dynamic variables on their x-axes

I have an expression with lots of variables, and I would like to make several plots of the expression, where the axis in each is a different variable. The idea is to put them side by side inside a <...
81 views

### Blocking dialog with a blocking child dialog

Suppose I have a DialogInput, in which there is a Button. The Button can trigger another <...