7
votes
1answer
403 views

Debugging a $RecursionLimit error?

I sometimes encounter bugs that involve a recursion limit. It's often very hard to find the origin of the problem. Would there be a way to copy the stack somewhere and abort the evaluation in order ...
1
vote
1answer
89 views

Is there a way to convert a string to a Table indicator? [closed]

I have a list like this: list = {"k1","k2"} I want to use the elements in the list as Table indicators: ...
1
vote
0answers
117 views

Can I use Mathematica to translate a English word to a Chinese characters?

I'm Chinese. I want to translate an Entity name to Chinese characterc. What should I do? Can I use Mathematica to translate a English word to a Chinese characters?
2
votes
2answers
132 views

Locator and manipulate

How can I achieve that the points on a Graphics element could be manipulated both by Locators (clicking and moving) and on the Manipulate panel as well. As you can see, only one of the methods work. ...
-1
votes
1answer
46 views

Algorithm in Module behaves different [closed]

In my Notebook i wrote this algorithm: ...
13
votes
1answer
305 views

Why does partitioning increase Dot execution speed?

I have noticed that multiplying a list of matrices can be significantly sped up by partitioning the list, calculating the product of the partitions matrices, and then multiplying the results. ...
8
votes
2answers
341 views

What's wrong with NIntegrate with “MonteCarlo” Method?

Bug fixed in version 10.2.0 My code is: ...
6
votes
2answers
203 views

Why does Nintegrate keep unevaluated?

Bug introduced in 10.0 and fixed in 10.2.0 It's no surprise that the "MonteCarlo" Method works well: ...
1
vote
0answers
33 views

Getting explicit BaseStyle or DefaultBaseStyle settings

Is there a way of making more similar the appearance of TogglerBar and Toggler controls that can sometimes appear quite ...
6
votes
4answers
320 views

Dynamic list in which the sum of the elements is invariant under changes to the elements

2nd Update Here's a snapshot of a graphical user interface I'm thinking. I hope this could be self-explanatory and demonstrate the functionalities I mentioned in the 1st update. Thank you all! ...
1
vote
1answer
107 views

Change parentheses to square-brackets when using CForm

I'm not experienced with Mathematica, but am learning to appreciate its awesome power for manipulations. I get the an expression like this when using CForm (I cut ...
14
votes
2answers
467 views

How to ContourPlot a function of the coordinates on the Earth's surface on a map projection

There are two similar questions (this and this), but one is too specific and the other is apparently not clear and has no answers. I'll try to make the question more complete. Suppose you have a ...
0
votes
1answer
93 views

whats wrong when I use for loop for creating a matirx? [closed]

When I use separate value for "i" and "j", I got the correct desirable answer. a = 2; i = 3; j = 3; !(*SubscriptBox[(matrix), ([([a])])]) = {{1, 1, 3}, {7, 4, 7}, {2, 6, 8}}; value = ...
2
votes
1answer
72 views

Algebraic Manipulations with Indices

I am absolutely new to Mathematica, but I've heard it is a pretty powerful tool for symbolic calculations. My problem (stated generally): I have three dimensional array. I define a symbolic operator ...
5
votes
2answers
174 views

Trouble with ParametricNDSolveValue

I have this: ...
0
votes
2answers
71 views

NIntegrate fails when integrating over a list from an external (MathLink) function

NIntegrate fails when integrating over a list from an external (MathLink) function. For simplicity, consider an external function f[x] that returns the list {x,2x}. In Mathematica, the function would ...
0
votes
0answers
43 views

What is the right way to remove head of a number? [duplicate]

I often have a number for which I want to remove its head, e.g. {1}. I know of two ways to remove the head: {1}[[1]] # & @@ {1} Neither of these methods seem ...
5
votes
1answer
96 views

Dynamics and Block interfere

As mentioned by Albert Retey in a comment, we can unintentionally interfere with our dynamics as follows ...
6
votes
2answers
341 views

Using NDSolve to produce 10,000 points of a solution

I am beginning to read the Differential Equations Laboratory Workbook by Borelli and the preface begins with an image. I understand how to use NDSolveValue (at a ...
17
votes
0answers
232 views

Is MathieuC for moderately large imaginary arguments broken?

I'm trying to plot MathieuC[-3,0.3,I x] for $x\in[0,10]$, and here's what I get even with arbitrary precision arithmetic (here I use ...
3
votes
2answers
210 views

Plot 2d-ItoProcess data in a plane

I am trying to simulate a simple 2d Ito SDE (randomly perturbed Hamiltonian system). Below is the code. ...
3
votes
2answers
91 views

Select elements from list with given head

I would like to select elements from list by specifying their head. E.g. SelectWithHead[{1,2,3.5,x}, Symbol] = {x} SelectWithHead[{1,2,3.5,x}, Real] = {3.5} What ...
4
votes
3answers
299 views

How do I draw random points from a region [duplicate]

as the title,this problem have confused me a whole day.If I have a region,how can I yield a random member in this region.The region such as ...
1
vote
1answer
169 views

How do I create a histogram of the binomial distribution for, say, p=.5 after 10 trials?

I apologize if this is question is too simple, if so it's because I'm a beginner. Anyway, it was easy enough to create a list plot, but I couldn't find out how to create an output that displays the ...
1
vote
2answers
78 views

BoxWhiskerChart Vertical Line

I have made a box plot to show the spread of past paper results for my A2 exams so I can easily see which subject need more work! ...
2
votes
1answer
106 views

How to loop in a nested Association?

Considering we have an Association: ...
4
votes
1answer
169 views

Arrowheads not quite working as expected

I apologize if this question already has an answer, but my search has yielded no results, and I can't seem to figure out what's wrong with my code, so I thought I'd ask here. I'm using Mathematica 10: ...
4
votes
1answer
75 views

Finding maximal subset of linearly independent functions

I've got a set of functions in one variable. I wish to find the basis of the corresponding spanning set Example: $$\left\{1,\frac{1}{1-\sqrt{x}},\frac{1}{1-x},\frac{\sqrt{x}}{1-x}\right\}$$ may ...
-1
votes
1answer
73 views

The energy released from burning one gallon of gasoline

How can I get this information from Mathematica or Wolfram|Alpha?
0
votes
1answer
196 views

Displaying a bipartite graph in Wolfram Mathematica

Which is the function that can plot me the bipartite graph $K_{7, 2}$ in Mathematica? And after that to delete 2 edges?? Thanks for the help.
6
votes
3answers
214 views

How to prevent ExportString from reencoding diacritics when exporting as JSON

I'm not sure if it's a bug with Mathematica or if I'm missing something, but when trying to ExportString a UTF-8 string with diacritics as JSON, it's messing up the ...
1
vote
1answer
113 views

Understanding `FixedPoint`

I understand that FixedPoint[(# + 2/# )/2 &, 1.] can be written ...
1
vote
0answers
35 views

Fibonacci series up to 300 terms [duplicate]

I tried to generate a list of Fibonacci numbers up to 300 terms and gets a runtime error. f[0]=0; f[1]=1; f[x_]:=f[x-1]+f[x-2]; Table[f[x],{x,1,300}] Is there ...
13
votes
1answer
196 views

CompiledFunctionCall vs. LibraryFunction

When compiling code to C, and the compiled code calls other compiled functions, I see CompiledFunctionCall in the output of ...
4
votes
2answers
194 views

How can export into an .XYZ file using decimals without scientific notation?

I have seen the other posts relating to this however there seems to be more restrictions when exporting to .XYZ. I am pretty new to this but I have been searching for hours. Basically, I have a ...
12
votes
1answer
522 views

Save a C compiled function without losing the blessing of C compiler

Consider the following example: ...
0
votes
2answers
41 views

Multiplying columns of a list of matrices

I have the following list of matrices ...
0
votes
1answer
186 views

Symbolic matrix inversion

If I try to get an inverse of a matrix: a | b | c b | d | 0 c | 0 | 0 Inverse[{{a, b, c}, {b, d, 0}, {c, 0, 0}}] I get the answer: ...
2
votes
2answers
160 views

How do I execute a block of code multiple times? [closed]

Rudimentary pseudoconceptial question: I have a specific block of code that uses random variables and generates a plot at the end based on random code. I want my code to run 10 different times to get ...
21
votes
2answers
264 views
1
vote
1answer
40 views

Can one put event listeners to parts of StandardForm expression?

I have a StandardForm expression Is it possible to add an event listener to the variables, parentheses, and plus signs so that when I click them their color changes for example. Maybe it would be ...
-3
votes
2answers
172 views

Vary the color of a 2D scatter plot [duplicate]

This is what I want. I want to change the colors as I progress through a list.
0
votes
1answer
66 views

Solve and NSolve hitting iteration limit for simple system [closed]

I'm am trying to get Mathematica to determine the intersection of a line and a parabola, like so: Solve[{x + y == 6, x^2 == y}, {x, y}] But evaluating this gives ...
0
votes
3answers
63 views

Simplifying Terms in a Matrix

Given the following 3 matrices: M1=1/3*{{1,1,1},{1,α,α^2},{1,α^2,α]}} Z1={{Z+Zg,Zg,Zg},{Zg,Z+Zg,Zg},{Zg,Zg,Z+Zg}} M2={{1,1,1},{1,α^2,α},{1,α,α^2}} where alpha ...
5
votes
1answer
143 views

Working with quantum mechanics spins

I've written the following code for simple quantum mechanics operators on spin states: It seems to work, but the output could be better - how do I let Mathematics know that $0**\ 0==0$, and can I ...
0
votes
2answers
46 views

Using Nest on a function that takes a function as one of its arguments [closed]

I have a function, nS[f_, xk_], which takes as arguments a function f and a vector xk. It ...
1
vote
0answers
112 views

How can I force the assumption that a symbol is a vector of n zeros

Using $Assumptions = Element[n, Integers] && Element[a, Vectors[n, Reals]] I can assume that a is a n-dimensional vector of Reals. How can I assume that ...
0
votes
1answer
39 views

Replacing y[x] with myPowerSeries

Consider: myPowerSeries = Series[y[x], {x, 0, 3}] Which produces this output. ...
0
votes
1answer
68 views

Why is zero times vector of reals not zero?

Using the following global assumptions $Assumptions = Element[n, Integers] && Element[a, Vectors[n, Reals]] && b == 0 && Element[c, Reals] ...
2
votes
0answers
178 views

How can I launch kernels in series using mathlink

I have written below code to launch n kernels connected to one another in series using mathlinks. Before you read the code allow me to be more precise what i want to achieve: Source kernel(k1) ...

15 30 50 per page