# All Questions

203 views

### To get a certain value of NDsolve of the solution [closed]

I need to solve the differential equations for different values. Once it is solved I want to take, for example, x[29] for each initial condition and plot it as a function of this initial conditions. I ...
80 views

### Integral for piecewise function inconsistent with the usual way

I have the following piecewise function: ...
159 views

### Sum Over Multiple Indices part 2 [duplicate]

Recently I asked this question as I was trying to see how to write a particular Identity. I asked about how to write the following sum: ...
121 views

### How to hide arrow tail in VectorPlot3D?

I want to plot arrow head only, because I want to plot a "surface" consist of all arrow head(draw a little ball or point instead of real arrow head,because a 'surface' with real arrow head is ...
92 views

### Am I simulating correctly my hidden markov chain?

I want to simulate a hidden markov model, in which $y_t|y_{t-1},x_t=i \sim N(\theta_0y_{t-1}+\theta_i,\sigma^2)$, where $y_t$ is the observations or data, and $x_t$ is the state variable of the ...
84 views

### A simple integral operation

Evaluating the following expression results in a non-zero output FullSimplify[Integrate[2 f[x], {x,0,1}] - 2 Integrate[f[x], {x,0,1}]] I think the output should ...
153 views

### Generating a permutation of elements in chunks

Is there a way for me to generate a list of permutations in "chunks" such that I needn't store everything on RAM all at once? Consider that (WARNING: DO NOT RUN! --- Will generate a list with 13! = ...
226 views

I have a dataset which I group an then calculate the maximum of an item. When done I get the desired result, but have no column heads. Here the example association (subset of my data): ...
84 views

### Subroutine execution repetition

I like to write second and third lines repeated operation only once as a separate module with some Name. In each main program line a set of different set boundary conditions data is given,Name invoked ...
303 views

### Bug in plotting function using FindMinimum?

Bug introduced in 10.0 and persisting through 10.3 or later While working on an answer to RegionPlot from NDSolve, I came across this strange behavior of ...
67 views

### strange behavior when calling external linux command

My platform is Mac OS X Yosemite 10.10.1. When calling several external linux commands as the following: ...
61 views

### Getting RandomChoice to work in Manipulate function

I'm a beginner mathematica programmer and I am tryin to create my first demonstration. This code should represent what happens if one changes the size of the reading frame, calculating the nucleotide ...
275 views

### HoldForm does not Hold Form for fractions sometimes

I'm facing a strange behavior of HoldForm. I need to display 1/2*3/4 in LaTeX like this : $$\frac{1}{2} \times \frac{3}{4}$$ ...
96 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 ...
798 views

### Generate nonoverlapping random circles [duplicate]

I want to distribute n circles unformly in an area(e.g. free plannar space). The circles could touch each other but cannot overlap. ...
154 views

### WorkingPrecision causes issue in the NIntegrate

I really can't figure out why my code sometimes is not working. My integrals involve two variables (k and kz). The integration ...
230 views

### Alternatives to FiniteElement as Spatial Discretization Method for NDSolve

Finite Element Programming: [...] It is possible to skip this section and continue with the discretization stage and make use of the initialized data structures ...
44 views

### Error message with RegionPlot after SetOptions

I get an error message with SetOptions[RegionPlot, ImageSize -> Medium]; RegionPlot[u v (1 - v) >= 10, {v, 0, 1}, {u, 0, 100}] that says ...
147 views

### Partial differentiation mixes up variables

Consider $$U \equiv \dot{\theta} - \theta \ ,$$ where as per usual $\dot{\theta} = \frac {d \theta}{dt}$. We then have  \frac {\partial U}{\partial \theta} = -1 \quad , \quad \frac {\partial ...
56 views

### Double application of NIntegrate produces unexpected error messages [duplicate]

In the course of trying to answer 69601, I encountered unexpected error messages. In highly simplified form, NIntegrate[NIntegrate[z y, {y, 0, 10}], {z, 0, 10}] ...
217 views

### NonlinearModelFit - “Encountered a gradient that is effectively zero”, all variables are 1, 1, 1 [duplicate]

I have data of the form {149.45, 0.371093}, {149.362, 0.375976}, {149.277, 0.380858}, ... }, where each element of the list is {x, y}. The plot of this, using ListPlot, gives an approximate Gaussian. ...
178 views

### Display 3D function and its gradient in same graphic [duplicate]

Is it possible to display e.g., $z=x^2+y^2$ with Plot3D and in the same box, in the $z=0$ plane, plot its gradient?
615 views

### How would I return a random Mathematica command?

I'm doing some metaprogramming. How would I make a Mathematica function that returns a random Mathematica command? Is there a list of command names that I could use ...
116 views

### Solve with limit over multiple variables

Very new to Mathematica so apologies for what is probably numpty question. The following returns no solutions. However, there is a solution! If I set a = 1 I get the solution b = 1/2. Can you explain ...
111 views

### Why does NMaximize does not follow the constraints that were given to it?

(someone may want to mark it as a duplicate, but I still have to ask! I just can't figure out why!) ...
97 views

### ImageResolution Doesn't Work! [duplicate]

The code below is supposed to generate a high resolution plot, but it does not! g = Plot[Sin[x], {x, -1, 1}]; Export["c:/sin.jpg", g, ImageResolution -> 600] ...
327 views

### Sinusoidal Wave over a Circle

A sinusoidal wave can be plotted in a two dimensions. Generally and simply : y[x]=Sin[(2pi/lambda)x] As it is being plotted, the horizontal axis (as a straight ...
251 views

### Truncating a list once all members of a set have appeared?

Consider if you would the case where we have some list of elements: list0 = {54, 4, 7, 9, 3, 54, 4, 20, 2, 456, 2, 3}; And we have some target list: ...
89 views

### Sum of two Piecewise functions give wrong vector

I would like to calculate the normal at a certain point of a parabola. The parabola is defined only on a certain area according to a Piecewise function. Afterwards ...
43 views

### Substitution breaking the scope

A novice's problem, perhaps: it seems that /. substitution does weird things to the scope. ...
108 views

### How to share numbered variables between kernels

Supose I have two variables v[1] and v[2]. I used: SetSharedVariable[{v[1], v[2]}] Then, ...
188 views

I'm interested in buying a "Home Edition" license for Mathematica, but there's the following information which I'd like to know beforehand and which I cannot find online: As I'm about to buy it, the ...
129 views

### Substitution in parameters to “Which”

Why in this expression ...
45 views

### Which operations preserve digit precision?

Imagine I had to use numbers with a 600 precision digits. Do all mathematical operations, like +,-,...
104 views

### Two dimensional high oscillated numerical integral

I have some problem with two dimensional integral. I want to calculate such integral. ...
76 views

### How to combine several plots with this special alignment? [duplicate]

How can combine different plots just as shown in the image? Just give codes about one example plot,and tell me how to create plots as the form as gaven. Follows are codes: n = 2; z = 200; [Alpha] = ...
160 views

### HEALPix grid on a sphere

Are there any Mathematica tools for using the HEALPix ( Hierarchical Equal Area isoLatitude Pixelation) grid on a sphere? It is commonly used in astronomy, but I have not found any Mathematica ...
171 views

This a computational challenge, to find an efficient algorithm to discover a quadruple $(n,n+1,n+2,n+3)$ with the same sum of prime factors as described in the MO question, "Ruth-Aaron triples, etc." ...
97 views

### The problem (time) caused by ?NumericQ

In here, I asked a related (similar) question. Using ?NumericQ seems have slowed down the entire calculation. But I now have a more serious problem: ...
144 views

### Expressions containing globally undefined symbols inside a function where they are defined

Consider the following code. f[a_,b_]:=x; Clear[a,b]; x=a+b; f[1,2] It returns a+b. However, from a certain viewpoint, one ...
81 views

### Nested list element at position specified by a list

I'm trying to avoid constructions like Y[[X[[1]], X[[2]], X[[3]]]]. That is we have a nested list (Y) of depth $n$ and another ...
167 views

### Exctrating data information from a file.txt

I really did previous long search in the site and I couldn't find any answer that might help me. So I am asking it. I have the following data set, ...
543 views

### How discretize a region placing vertices on a specific non-uniform grid

Given a generic region, for example: Ω = ImplicitRegion[ 2 x^2 + 3 y^2 + 2 x y - 2 <= 0 ∧ x^2 + y^2 > .1, {x, y}]; and a non-uniform grid, for ...
140 views

### ConversionRules and style inheritance

Take the LaTeX-Article stylesheet stylesheet = FileNameJoin[{"Article","LaTeX-Article.nb"}]; Compare these outputs ...
241 views

### RegionPlot from NDSolve

I am having quite a headache using RegionPlot to see the region of acceptance of certain coupled differential equation. I shall elaborate and try to be as ...
78 views

### Exporting graphic to pdf acting funny [duplicate]

I have a plot created in a notebook that I usually would right click on and choose Save as pdf. It worked fine until this morning. Shown below, the first plot is what I used to get. The second plot is ...