# All Questions

90 views

### Display level of recursion of a recursive function during execution

Given a recursive function, is there some simple way to display or store the value of recursion or "how many levels deep" the function is at a given time? For instance, if we wrote the recursive ...
291 views

### For a given expression: if it appears, remove it, but if it is absent, add it

While reformatting Szabolcs's code from (42660) I noticed this interesting operation: ...
70 views

### Is there any strategy to have a compiled version of FindFit or NonlinearModelFit?

Disclaimer: This is not a precise question with a definite answer. I know that neither FindFit nor NonlinearModelFit is in the ...
58 views

### Is there a notebook to create entries for OEIS?

Is there a notebook to create entries for OEIS? I seem to recall something like this a few years ago, but I haven't been able to find one. It might be from MathWorld. Any suggestions? Edit If I had ...
82 views

### Unable to fit function convolved with NIntegrate with FindFit even with NumericQ

I am attempting to fit to the convolution of a simple function with a Gaussian. (I realize this could be done with Convolve also, but I thought I could make it go faster this way). I am able to ...
36 views

### Hiding a Manipulate slider

I want to generate a different random initial condition for rule 110 using a Button for Manipulate, not a slider. How can I make the slider invisible here? I tried specifying ...
107 views

### Trace two DateListPlots?

I currently have two DateListPlots in the same graph, with two different y-axes. I downloaded the package "TwoAxisDateListPlot" to accomplish this with ease. Now I want to be able to trace both of the ...
32 views

### Problem with control structures on getting root values on array [on hold]

Since mathematica control structures are a bit different from programming languages that I'm familiar with , I'm having problems. I want to assign the roots of a function to an array , but check if ...
110 views

### List Manipulation Via Conditionals

I'm trying to convert one list to another by applying a condition on the list's elements. But I can't figure out how to do this in mathematica's language. Python example below ...
53 views

### Strange behavior with Show command

I enter this: ...
43 views

### Possible to dynamically redraw single plot of multiple shown together?

I am attempting to create a tool to visualize gradient, eigenvector, and eigenvalue information for a 2D surface. I want to show a contour plot of an inputted function and overlay the gradient and ...
25 views

### CurrentImage returns almost fully black image

On Mathematica 9.0.1.0, Windows 7 SP1 Calling CurrentImage[] returns a black image, with a few non-black pixels near the top of the image, which may be some kind ...
139 views

### Is it possible to build/simulate/extract data from a System Modeler model completely inside a notebook using the MathModelica language syntax?

See examples in: http://www.mathematica-journal.com/issue/v10i1/contents/MathModelicaPaper/MathModelicaPaper_2.html It seems to be ruled out by the statement (Chapter 2 intro): "The subset of the ...
25 views

### LineScaledCoordinate problem for exact coordinates

There appears to be a bug in LineScaledCoordinate I've faced writing an answer for Animate point go round a triangle. For coordinates with exact values, instead of ...
39 views

### How do I plot 3 (x,y,value) on a Histogram3D[] function?

I have been trying to plot data using the Histogram3D function but I've had no luck, in excel I have x, y and a value I want to plot for each pair, do I have to save this as a data file first? I have ...
76 views

### Why does ToRules return a Sequence?

Why does ToRules return a Sequence expression? Why doesn't it return directly what ...
101 views

### Proving large inequality in 6 variables

I have arrived at a very large inequality in 6 variables that I would like to prove is true. The command I have tried is the following: ...
56 views

### how to solve line and ellipse equations in 3D? [on hold]

I have a point and a vector to find the line equation, and ellipse equation in 3D. I need to solve the two equations of line and ellipse in 3D. how can I do this, what equations should I use?
45 views

### Compress uses too much memory and sometimes crashes the Kernel

Using Compress is a good idea to save memory when working with large expressions. The problem is that Compressing large expressions also uses a large amount of ...
70 views

### Preventing complex term in a differential equation solution

I am solving the initial value problem: $$y'=\frac{t+1}{t(t+4)},\quad y(-1)=0$$ I believe the correct answer is $$y=\frac14\left[\ln(-t)+3\ln(4+t)-3\ln 3\right]$$ with an interval of existence ...
90 views

### Obtaining the relations of variables using diagonal matrices

I know this is too an elementary question, but I am a pathetic newbie in mathematica and I cannot find any answer by googling. What I want is obtaining some relations of unknown variables using their ...
104 views

### Fick's Law over Implicit Regions

I'm trying to solve 2D Fick's law of diffusion from the boundaries of a triangle (future shapes will include more complex implicit regions). I'm able to model diffusion without time in complex ...
93 views

### Boundary sphere partial differential equation

I am trying to solve partial differential equation in spherical coordinates $(\theta,\phi)$,but I don't know how to properly include boundary conditions of $\theta$. For $\phi$ it is periodic, but ...
34 views

### Import table from txt file with specific rows

I have a .txt file written as 1 2 3 4 5 6 7 8 9 10 11 12 I would like to import it as three matrices according to the rows. I used b = Import["d:\am.txt", {"Table", Range[1, 2]}] Seems it ...
118 views

### How can I get all solutions of a system of equations with Reduce?

The post What is the difference between Reduce and Solve? discusses the difference between Reduce and Solve. Now, with the ...
96 views

### Differential equation with a Heavisidetheta function running for ever

So I'm trying to get the solution of the following differential equation: ...
21 views

### How to “reduce” a probability distribution satisfying certain conditions [migrated]

I will try and explain the question I have in term of an example. I am given some probability distribution $f$, in this case of 2 variables x and p, $f(x,p)$. For example, I can pick the ...
110 views

### Get the complement date range

Suppose that I have a date range list drlist = {{"2015-01-01", "2015-01-05"}, {"2015-01-07", "2015-01-07"}, {"2015-01-12", "2015-01-23"}} ...
69 views

### ordered tree data structure

I have a map $f:X\to \mathbb{N}$ and I wish to find $x,x'\in X$ such that $f(x)=f(x')$. Since such elements are rare, I will have to check very many elements and perform many comparisons, so I suspect ...
21 views

### Graphics3D loses interactivity in Dialog window

Is there a way to keep Graphics3D objects manipulable when they are embedded in a Dialog window (CreateDialog,...
688 views

### How to Map a subset of list elements to a function?

How would you, given a list {1, 2, 3, 4}, apply a function f to 1 and ...
68 views

### Unexpected pattern matching behaviour: PatternSequence vs. Optional

Consider the following pattern-matching expressions: ...
60 views

### Good sources of programming exercises for learning Mathematica programming? [duplicate]

I'm learning Mathematica programming. I wonder if there are any good sources of programming exercises particularly suitable for practicing Mathematica programming.
41 views

### How can I run a Normal Boundary Intersection method? [on hold]

I have a constraint optimization problem. I want to convert it to a multi-objective mathematical programming problem (Multi-objective optimization , vector optimization). I need to run Normal Boundary ...
34 views

### What is the command for the shortcut _? [duplicate]

I was trying to look up what _? does but I couldn't find anything in the documentation and it's hard to look up symbolic strings because most search engines use these symbols internally.
37 views

### ParametricPlot3D plot n functions [on hold]

Below is the code I am aiming to get, however I do not know how to have mathematica dynamically generate code to create n numbers of {..., examplefxn[[n]], ...}, ...
887 views

### Can Mathematica Handle Open Intervals? Interval complements?

Open Intervals Following up on this question, I was wondering whether Mma can handle open intervals. For example, the union of the intervals, $$1<x<5$$ and $$5<x<8$$ should not ...
36 views

### Using colorData and BarLegend in ListPlot

I read lot of questions about this issue, mainly: the stack code So,I tried create a list plot with bar legend , using the following code: ...
61 views

### AutoGeneratedPackage Formatting

If you do Ctrl+Shift+o you open an option inspector. And then you can enable ...
37 views

### Why returning False? [on hold]

Can anyone explain the false? I'm trying to grab co-efficient in front of X^2 I think. I say I think as I'm following my tutors example using his screenshot the only difference between his question ...
109 views

### linear combination of successive elements in a list

Say I have a list $E$ and want to build a list $F$ with the entries $F_j=E_j-2E_{j-1}+E_{j-2}$. I know that this happens to be achievable by iterating the function ...
58 views

### Image3D with values outside of the range [0,1]

I am writing some functions in Mathematica for representing MRI anatomical image volumes. The natural way to represent such a volume seems to be as an Image3D form. However, I've noticed an ...
120 views

### FontSize problematic when used in LabelStyle

Bug introduced in 9.0.0 and persisting through 10.0.2 or later Consider the following few examples, each producing a trivial graphic object: ...
311 views

### Can Mathematica solve Plateau's problem (finding a minimal surface with specified boundary)?

Given a closed curve $\mathcal C$ in three dimensions, is it possible to use Mathematica's built-in functionality to compute a minimal surface whose boundary is $\mathcal C$? For simplicity, let us ...
42 views

### cannot shade the vector in different color

I need to color each vector into different colors.. but this formula just dont work. ...
46 views

### SumConvergence fails in version 10

SumConvergence[(-1)^(n + 1) ((Cos[n^2] + Sin[n + 2])/7^n), n] Mathematica fails to provide a result (true/false) but wolfram alpha works. What should I do ? It ...
31 views

### Replacement of terms/Pattern matching involving products of derivatives of a function

In delving into Ramanujan summation, I'm trying to get a hold of the relations of the form \sum_{n=0}^\infty f(n)=\dfrac{h\frac{d}{dx}}{{\mathrm{e}^{h\frac{d}{dx}}}-1}\int_{0}^\infty ...
166 views

### Gather lists according to another list

I have a first list of pairs like this one: ...