1
vote
1answer
115 views

Open parent cell groups of selected cell

I wrote a small script for a palette, which allows me to highlight a specific cell in a notebook by using SelectionMove[mycell, All, Cell]. The cell is selected as ...
1
vote
1answer
116 views

How can I make a ContourPlot3D with inequality constraints?

I need to plot a function in implicit form as below: ...
8
votes
1answer
846 views

Schrödinger eigenvalue problem in two dimensions (Harmonic Oscillator)

I read here the discussion about how to solve a one-dimensional eigenvalue problem. I am wondering, how can one generalize these methods to two dimensions? For example: ...
4
votes
1answer
160 views

Importing malformed XML: Import[… “XMLObject”] vs ImportString[…, “XML”]

It appears that Import[ url , "XMLObject" ] is more forgiving of improperly formatted XML than ImportString[ string, "XML"]. For ...
3
votes
2answers
139 views

Labeling vertices by number in Graph: Getting text to display at the right size

Minor aesthetic question here. I was playing around with Graph's and decided to render a cute-looking family of directed graphs, with the vertices being the number ...
0
votes
2answers
193 views

Solving partial differential equation with DSolve does not give a result [closed]

I am trying to solve the equation: $-(d^2/dx^2+d^2/dy^2)\psi+(x^2+y^2-2)\psi=0$ Here, is my code: ...
3
votes
1answer
162 views

RegionPlot3D and Texture

I'm getting a white solid instead of a solid with texture, I'm not sure what is wrong: ...
5
votes
1answer
255 views

Can I automatically stop operation that is too slow?

I need to write code like this: Do operation 1, but if it takes more that 5 seconds then stop it and do operation 2. Is it possible to do this somehow without manual interruption?
6
votes
1answer
325 views

Meshing the surface of a non-convex object

I would like to mesh the surface of a cloud of points that may not be completely convex, for example the points in this question. Mathematica does not provide triangulation of 3D points, but there is ...
0
votes
0answers
34 views

Grabbing columns from a matrix [duplicate]

If I have a matrix - exampleMatrix = {{A1,B1,C1},{A2,B2,C2},{A3,B3,C3}}; And I want to create a matrix like - ...
0
votes
5answers
87 views

Merge two lists for List3DPlot [duplicate]

I have a two lists: list1 = {{x1, y1}, {x2, y2}, {x3, y3}, {x4, y4}, {x5, y5}} and list2 = {z1, z2, z3, z4, z5} and I want to ...
3
votes
1answer
2k views

How can I create an empty JSON object?

For creating non-empty object, I use following syntax ExportString[{"key" -> "value"}, "JSON"] (*{"key" : "value"}*) But how can I create an empty object? ...
2
votes
1answer
96 views

Can a Symbol own OwnValues that don't evaluate when it's the head of an expression?

I believe this a question that most of us have encountered when we were beginners but forgot when we got more familiar with Mathematica. We know the notation $y=y(x)$ for functions, where $y$ here ...
3
votes
2answers
536 views

In a ListPlot of LinearModelFit, plot error band

This is similar to this question. The fitted line can be plotted alongside with the data with this code: Show[ListPlot[data], Plot[lm[x], {x, 0, 5}]] I would ...
0
votes
3answers
189 views

Why is 1. x (Times[1.`, x]) not simplified to x?

This is maybe a silly question, but I could not think of any logical reason why it is not simplified automatically. I was working with a big linear equation system with some constrained inequalities ...
8
votes
3answers
1k views

Skip header lines on import

When importing a data file what are the comment symbols for Mathematica? That is, given a file like this blabla bulbul 1 2 6 54 7 ... .. what symbol do I have ...
3
votes
1answer
71 views

Print prints into the Messages notebook rather than into the evaluation notebook

Some time ago I noticed that the results of the evaluating the function Print[something] does not emerge in a new cell created in the notebook where the operation ...
1
vote
2answers
161 views

Test if a list is a permutation of another list

This question may have a simple answer, but I can't find it anywhere in the documentation. I'm trying to find a function that tells me whether a list is a permutation of another list. So the function ...
0
votes
0answers
50 views

Hide your controls inside Manipulate [duplicate]

I didn't find any topic that could help me; I hope this isn't repeated. I just want to show a control if a specific option is selected inside a popupmenu: ...
3
votes
1answer
164 views

Control over the way matrix is displayed

I am wondering how to change the output format in Mathematica. For example, I have $x=\binom{3}{1}$ and $y=\binom{2}{5}$, and I want to find what linear combination of $x$ and $y$ produces ...
0
votes
2answers
854 views

Eigenvalue problem and plotting its eigenfunctions [duplicate]

How many different ways can one solve an eigenvalue problem and plot its corresponding eigenfunctions in Mathematica? For example for Harmonic Oscillator? Which one is the most accurate one? Thanks ...
2
votes
0answers
47 views

Sending RObject to RFunctions

I want to realize function from some R package in Mathematica. First load RLink and package what I need ...
2
votes
0answers
181 views

Kernel quits upon evaluation of a limit

Using 9.0.1 on OS 10.9.3, I evaluated Limit[(1 + t/Sqrt[n])^-n, n -> Infinity] at the start of a session and it caused an error that made the kernel quit. ...
3
votes
3answers
247 views

How can I extract multiple spans from a list?

I know in Mathematica, I can do A = Range[100]; B = A[[50 ;; 60]] B will then contain the 50th through 60th elements of A. Now, what if I wanted B to take 10th ...
1
vote
1answer
244 views

Stacked bars in a barchart with individual and overall labels

There are a lot of questions here about formatting of barcharts, but I couldn't find one matching mine. I seek to display data in stacked format, labeling each component of the stack and the total for ...
1
vote
1answer
135 views

How to use Button as a control in Manipulate

I am trying to use Button as a controller in Manipulate. I have done some thing like this: ...
0
votes
1answer
110 views

How to calculate definite integral when boundary is a limit?

Integrate[Log[x]/(1-x)^2,{x,eta,Infinity}] The conditions are eta>0, and eta->1, how ...
2
votes
3answers
186 views

Using Part rather than Extract

In my work I found that I needed the Extract function. However I was wondering if there was a way to use Part. Assume that ...
1
vote
0answers
343 views

Solving two-component two-dimensional differential Equation with NDSolve (Brusselator Model)

I'm trying to solve a two-component two-dimensional reaction-diffusion differential equation system with Mathematica. The background of the model is the so called "Brusselator Model" where one can ...
2
votes
0answers
72 views

RDPStruct.exe: what is it and why are there so many?

I have an old (v7) webMathematica system running and it seems to generate a lot of RDPStruct.exe processes. First, what does this "Converter" do? GIF.exe and JPEG.exe are obvious, but "RDPStruct" ...
2
votes
3answers
315 views

Alternative ways to AppendTo and Delete in a While loop

Is there an alternative way to do AppendTo and Delete and also replace k0 during every ...
0
votes
1answer
108 views

Tab between elements in a GUI layout

If I have a bunch of input fields, I can tab between them quite conveniently, but if I want to navigate between the input fields and another element (in my case, a button), I have to click on the ...
2
votes
0answers
20 views

In a Function, how to Ensure Code Runs Prior to an Abort [duplicate]

Is there a way to set aside some code in a function that will be triggered to run if the evaluation of the function is aborted by a user? Specifically, I have a function that has to open a log file to ...
2
votes
1answer
112 views

Table with some editable cells

I have a table: I want it to be editable only where the zeros appear. I read this post Generating an editable table that can be used as input because it's almost exactly what I want, but I couln't ...
0
votes
1answer
65 views

Inequality test returned unevaluated

I tried, Refine[Sin[k]^2/(k^2 + k + 1) < 1/(k^2), Element[k, Integers]] $\frac{\text{Sin}[k]^2}{1+k+k^2}<\frac{1}{k^2}$ It returns unevaluated. I ...
1
vote
0answers
68 views

How to find a scaling parameter in matrix inversion process by MMA?

I simply would like to find the inverse of a given matrix $A$ by the iterative method $X_{k+1}=X_k(2I-AX_k)$ using $X_0=\frac{1}{\sigma_{max}^2}A^*$. An example is as follows ...
3
votes
1answer
75 views

Convert an expression's symbols of form a$x to a[x]

I want a function that takes expressions of the following form: a$x and converts them to a[x]. In particular, consider the ...
1
vote
2answers
109 views

Clearing arguments passed to a Module

Is there a possible way to clear the arguments passed to a module to release some memory. I believe that arguments passed to modules are passed by value rather than pass by reference. e.g. I have the ...
1
vote
0answers
150 views

Code for solving numerically an integro-differential equation

First of all, I want to greet the community. This is my first question, but I hope I will be able to help answering others members questions, although I am quite new working with Mathematica. I would ...
2
votes
2answers
150 views

Create a Figure with a sequence of Balanced Binary Trees

I would like make the attached image by Mathematica. someone who could help me? Thank!
1
vote
1answer
522 views

How can I obtain Wolfram Alpha's “alternative forms” of an expression inside Mathematica?

When I type in Wolfram Alpha, say, cos(a+b) or cos(a+b)^2 or (OK this next one can easily be obtained in Mathematica, ...
2
votes
1answer
236 views

Segment parts of a picture

I remember that there was some thread of this sort, but I could not find it, so I hope it's ok to open a new thread. I want to segment pictures of the brain, i.e. I only want the area within the ...
1
vote
1answer
68 views

Devising a sparse array rule

Suppose I have a matrix A={{1, 2}, {3, 4}} that defines the positions of non-zero values in a sparse array: ...
8
votes
2answers
344 views

Mathematica outliner's capabilities

As my notebooks get larger, I often try to organize them with titles/subtitles etc, structuring them as an outliner (http://en.wikipedia.org/wiki/Outliner) This also helps me as I try to structure a ...
0
votes
1answer
102 views

Solving a differential Equation

I am trying to solve -D[((α + γ/2)*a + β/(2*a) - R*a^3)*p[a], a] + 0.5*D[(γ*a^2 + β)*p[a], {a, 2}] == 0 with DSolve, but it ...
0
votes
0answers
315 views

NDSolve gives wrong results for “stiff system”

I have a physical problem in which I want to solve for c[e] as a function of e, where c is ...
0
votes
0answers
59 views

Expectation taking unusually long to evaluate

I am trying to evaluate an expectation, but it is taking an extremely long time although the expression itself should not be too complicated. My code is ...
0
votes
1answer
135 views

Using a LocatorPane

I have a network of a power grid where the edge are the power lines and the vertices are loads or generators. I was wondering how I can import an image into Mathematica to derive some sort of ...
3
votes
0answers
62 views

What SampleRate and SampleDepth does Mathematica use on output?

The Play function will happily accept arbitrary values for its SampleDepth and SampleRate ...
5
votes
3answers
254 views

How to change the number of markers in Plots?

Two questions, but I am not sure whether they are already answered or not. How can I create PlotMarkers (in ListLinePlot) with ...

15 30 50 per page