# All Questions

129 views

### Treat all variables as local in a module [duplicate]

In most languages, any variable defined inside a function is considered local. ...
109 views

### Apparently contradictory output from Series and D

I defined a function as: g[b_] := Integrate[f[n]Exp[-b DA (n.u)^2], n] Obviously D[g[b], b] /. b -> 0 gives ...
161 views

### How to deal with too much recursion

I have put together a very simple climate model based around four equations which define the state at time t based on time t-1, ...
225 views

### Intersection of two splines

I have a collection of sets of points, each set defining the segment of a (nice) curve on the unit sphere $S^2 \subset \mathbb{R}^3$. The points are computed numerically. I now want to compute the ...
206 views

### Why is Plot3D giving me a surface with gaps?

I am trying to get plot for the band structure for graphene. ...
302 views

### Find parameters of ODEs to fit solution data

Problem How to find the initial conditions x[0],y[0] and the optimal value of parameters ...
278 views

### How to make a filled Ellipsoid?

I want to make a filled Ellipsoid, but it seems Filling options doesn't work in Graphics ...
102 views

### How can I use Dynamic to run a script when a new file is added to a directory?

I have an external program saving files to some directory on my hard disc. I'd like to run a script that imports and runs a script on each file as it is added to the directory. Is there a simple way ...
160 views

### Selecting a list from a list of lists

In working through Programming Paradigms Via Mathematica (A First Course) I have come across this two part question: A permutation of length "n" is a list of the first n positive integers in ...
126 views

### Keeping vertexcoordinates after adding a new vertex

I want to add a new vertex to a graph, with fixed VertexCoordinates but when I use VertexAdd, the new graph does not have the VertexCoordinates of the previous one. ...
241 views

### Only final result from NDSolve

Finally I started to play with differential equations in Mathematica. And I have faced the problem, which seems too me so basic that I'm afraid this question is going to be closed soon. However, ...
129 views

### Manipulate keeps updating due to a function

Edit: This is apparently only a problem on a mac running OSX. I am trying to use the 'stretchText' function by Jens. But when I use it in manipulate, the output keeps updating without changing ...
249 views

### Mathematica inserts extra \left and \right for absolute values in LaTeX output

Type the following in a Mathematica DisplayFormula cell(other styles may also encounter this problem): Esc+l+|+Esc and Esc+r+|+Esc, and save as LaTeX. Note: See the difference of the character ...
250 views

### Why LibraryLink function crashes at a second time?

I'm trying link one of Lapack's function to Mathematica through LibraryLink, and the Library function works great at the first execution but crashes at the second time. Here is the code (modified ...
322 views

### Plot the boundaries of each piece of a piecewise function

I'm wondering how to plot the boundaries of each piece of a bivariate piecewise function. Lets take for instance the following piecewise linear function $B_{111}(x,y)$: ...
150 views

### Error messages from compiling the Piecewise function

The following works Compile[{{x, _Real}}, Piecewise[{{{0., 0.}, x > 5.}}, {1., 1.}]] but if I enter the Piecewise[...] in ...
177 views

### Generate regularly spaced points from the surface of simplexes

I need to generate regularly spaced samples (points) from the surface of unit simplexes with 2 or greater vertices or end points. I can generate random samples pretty straightforwardly: ...
370 views

### How to graph a series of coupled oscillators and watch the wave move along them

Here are the differential equations that set's up the 11 coupled oscillators. ...
472 views

### How to label axes in 3D plot adequately?

The following code produces plot with axes labels, which are jumping constantly. ...
390 views

### Transcendental equation with ContourPlot3D

I am still a newbie to Mathematica, so I am still getting used to the syntax and logic of the program - but I've been trying to do the following 3D plot: ...
509 views

### Wallis Formula and Pippenger Product---How do we get symbolic output?

The Wallis Formula computes $\frac{\pi}{2}$ OEIS and the Pippenger Product computes $\frac{e}{2}$ OEIS. Here is a combined formula: ...
181 views

### Better method for creating a tuple out of two lists

I just combined two lists using this method ...
118 views

### Is it possible to lower the bitwidth of (floating point) numbers?

The answer to this question will most probably be a definite no. Nevertheless, I would like to know whether it is possible to represent reals in the memory on less than the standard 32 or 64 bits ...
266 views

### Integration gives ComplexInfinity when it shouldn't

A simple example of my problem is that Assuming[k ∈ Reals, Integrate[Exp[l]/((1 + Exp[l])*Exp[k*l]), l]] /. {k -> 2} gives ...
239 views

### Proper use of arbitrary number of variables

So, I'm working on a project where the number of independent variables is not fixed. Consider a problem of $N$ independent variables, $\boldsymbol{r}$. I want to perform different things with them. ...
563 views

### Subdividing a polygon , equivalent fractions

I see that I was a real "doofus" here and my original question was flawed. You can't divide a polygon like you can a circle or a rectangle, except in special cases... I should have seen that right ...
160 views

### Why rule does not work if Flat attribute?

The following works: ...
372 views

### Using the symbol I for electrical current [duplicate]

I would like to use the I as a symbol for the electrical current. How can I redefine it, so it is not interpreted as the imaginary unity?
106 views

### How to set MouseAppearance to void?

I need to get an output graphics which does not show mouse cursor over itself. I didn't find a corresponding value in MouseAppearance documentation and ended up ...
180 views

### Numbered symbols

I work with an exterior algebra over $R^n$. I have the basis $\{1,\omega_i\}_{i=1}^n$ in this algebra, and my differential operator is defined as d\omega_k=\sum_{i>j>0,i+j=k} (i-j)w_i\wedge ...
130 views

### some Graphics output do not fully render on the screen until an extra click is made into the notebook

Sometimes when using a command such as Grid and looking at the output, some of the actual lines (frame, gridlines) that make up the display will be missing on the ...
285 views

### How can I set different opacity values for the background of a ListPlot

In the following example: ListPlot[{1, 2, 3}, Background -> Green] how can I set the Opacity[] for the background such ...
172 views

### What's wrong with this code to create a matrix?

Here is my code: ...
349 views

### Sort matrix by columns and rows without changing them

I would like to sort a matrix in descending order first by the total of each column, then by the total of each row, but without changing their content. For example, if I had: ...
131 views

### how to select all cells with specific property such as the ones that are closed

I have to close many cells each time before I export a notebook to HTML since I do not want to display many code cells and other cells. I select each cell one by one, and do ...
151 views

### How is OptionsPattern[] defined? Can I replicate this?

I am writing several functions which all take similar input parameters (a complicated nested list structure). Is there some way for me to define a pattern that can be used in multiple places and ...
397 views

### Replacements/Substitutions in Mathematica

I am a new user of Mathematica and have some questions about the simplifications of calculated expressions. I am unable to attach an image of the session, but my Mathematica commands are: ...
198 views

### Exported graphics texture to eps is too dark

Why is the exported graphics eps file so dark? It looks much lighter (and better) as the Mathematica output appearing the notebook. After running ...
506 views

### ColorFunction and/or ColorScaling issue with ParametricPlot3D

My goal is to use ColorFunction to color a cylinder based on the $z$ value of a separate Plot3D. I'm not sure if I am making a ...
194 views

### Self-referential list or table of buttons

How could one create a table or list of buttons, such that clicking on a button removes the button itself from the list?
211 views

### Reproducing Derive's plot of $1 - x^2 - y^2$ in Mathematica

In Derive 6, if I plot $1 - x^2 - y^2$, I get this: However in Mathematica 8 I get this: I'm using Plot3D[1 - x^2 - y^2,{x,-5,5},{y,-5,5}] What should I do ...
181 views

### Why can't I remove Orderless from Plus?

I am making some random algebra equations, and I want to have the ordering be random too, such that if my random equation generator makes x+1, the output stays ...
246 views

### Median marker style in BoxWhiskerChart

I was trying to adapt the BoxWhiskerChart to obtain a minimalistic quartile plot, like this: What I obtained is the plot below that is, however, unsatisfying; ...
320 views

### Enabled option for slider in Manipulate not updating dynamically

In a Manipulate expression I have a slider control which has the Enabled option ...
266 views

### Why is an integer not considered as a real?

Please consider the following: zeros={0.,0}; data={1, 0., 0}; DeleteCases[data, #]&/@zeros Head/@zeros (*{Real, Integer}*) (*{{1, 0}, {1, 0.}}*) For my ...
308 views

### Probability: proportion of 1000 random lists for x that contain the same nrs

Give a function which calculates for each x a random list of birthdays (which can be x=1 to x=365) birthdays[x_] := RandomInteger[{1, 365}, x] is my answer. ...
302 views

### Creating sums of elements from a list

I have a list $(d_1, d_2, .. d_k)$ and I want to create all sums that I get for adding only two elements for my list $(d_1+d_2, d_1+d_3,...d_{k-1}+d_k)$. The ...
200 views

### Build recursion in parallel?

Problem Let's define a simple recursion. f[1] = 1; f[n_] := f[n] = f[n - 1]*n; If I evaluate f in parallel ...