# All Questions

52 views

### Arrange Grid of Table elements horizontally [closed]

I have a Table consisting of an independent variable and two functions. I want to output it like this: ...
460 views

### Drawing a Gradient Between Two Circular Arcs

Suppose I wanted to use Mathematica graphics primitives to create a gradient of colors between two circular arcs. It's easy enough to make an area between two circles a solid color, but what if I ...
58 views

### Can I get a symbol cross-reference of a Mathematica Notebook?

Is there a way to get a cross reference listing for a notebook or set of notebooks?
44 views

### How can I run my API on an image?

I've built an API that takes a url of an image as an argument. Using Import[] I can easily call my API on any url and get the results... but I need to run it on an ...
45 views

### How to convert a string representing date into a DateList expression?

How to convert a string representing date into a DateList expression? For example, how to turn "1/2/2000" into {2000,1,2} assuming American style, and {2000, 2, 1} assuming European style, ...
87 views

### Join Two Element Meshes

Let's say I have two element meshes defined as the following: ...
80 views

### How to draw the area that cover given points on listplot

I have a lot of points' coordinates. I drew them on a 2d plot with ListPlot, and the points cover an area. Then I need to get the region that cover these points. Is there a way to do that? Thanks.
148 views

### A plot with labeled points in one plotting command?

For my work, I am examining the values of a complex function as I vary the input according to a real parameter, and I want to both give the general plot and the plot of specific points, with labels ...
78 views

### Avoid copying memory for each subkernel

Here is a simplified example illustrating my issue; ...
68 views

### Solving PDE with Condition on Inside of Region

I'm trying to figure out how to use NDSolve to numerically solve PDEs where some internal values may be specified on the region of the solution. An example, which I picked from a textbook, is solving ...
78 views

### Why Plot does not work with a computed integral?

I have been following the examples of the official W|A documentation; exactly: http://reference.wolfram.com/language/tutorial/UsingANotebookInterface.html The ...
307 views

### How can I align Cuboids within a cube

I am trying to align (colored) Cuboids within a cube, but the automatically coordinate generation "Row-2.)" is currently buggy. Can somebody help me please (the variable bound should be the start and ...
66 views

### Exclusion disappears but style doesn't work

Consider this code: f[x_]:=(6 + 4 x + x^2 - x^3)/(x-2) Plot[f[x], {x, -10, 10}, Exclusions -> {2}, ExclusionsStyle -> Directive[Red, Dashed]] It produces ...
64 views

### Encoding variables

I'm trying to fit a Logistic Model using LogitModelFit in Mathematica. The data I'm using contain qualitative variables that I have to encode. I've searched in ...
45 views

### What function is the best for solving differential equations? [closed]

dy/dt = -y^2, what is the best function to solve this equation?
57 views

### Problem with the laplace transform

I am trying to write a program in mathematica to solve green's functions, like the following. They come up all the time in Quantum Field Theory. I have learned, student's can sometimes see it better ...
31 views

### Fit a custom process to a data: inhomogeneous 2-state Markov chain

I would like to fit a custom process - a time inhomogeneous 2-state Markov chain, to data. The time inhomogeneity is a result of the transition probabilities varying sinusoidally through time with a ...
146 views

### Functional programming approach to avoid traditional loops

I'm currently learning from the wonderful post: Where can I find examples of good Mathematica programming practice? And i'm correcting my habits using Nest/Map/Thread instead of loops. The problem ...
203 views

### Integral of function involving Dirac delta

I am performing lots of simple calculations with dirac delta functions. It would be awesome if Mathematica could do this routine exercise for me, eliminating any possible human errors. For example, ...
46 views

### Exporting and importing lists of lists

I have a list of lists of data on the following form (one element): {"NYSE:AEM", 7.13*10^9, "Gold", {{2014, 4, 16}, {2014, 5, 2}, {2014, 7, 31}}} And all I want ...
48 views

### How to modify the output result of an evaluation

For ease of notation, I have defined a function, $f$, that defines the permutation of Bosonic particles such that it has the following properties (the form of $f$ is irrelavent for this question): ...
171 views

### Code for (a,b) with gcd(a,b)=1?

I am trying to make a big table that includes all ordered pairs (a,b) with a (1,2) (1,3) (2,3) (1,4) (3,4) (1,5) (2,5) (3,5) (4,5) (1,6) (5,6) ... Any ideas? Thanks!
201 views

### Obtaining the number of iterations used in ReplaceRepeated

ReplaceRepeated has an option MaxIterations which indicates Mathematica is keeping track of the number of iterations. Is there ...
123 views

### Staight line Mesh

How to see (t,u) junction/nodes with a dot or a small circle connected by straight line in Mesh in 3D, but not as arcs generated by a large number of small steps of t and u.The command should, if ...
68 views

### How to loop a sound

I have created a sound which I would like to play continuously until stopped, by looping back to the beginning. The sound is represented as list of samples, which can be played by ...
76 views

### Von Neumann's method to generate points uniformly distributed on a region of a n-sphere surface

I am trying to generate points uniformly distributed on a region of a single n-sphere surface (all angles in hyperspheric coordinates are between 0 and Pi/2). I decided to use von Neumann's method ...
67 views

### Weird result of DensityPlot - drastic changes because of slight modifications of plot range

DensityPlot[ Max[0, 0.1 - Abs[1. - Sqrt[x^2 + y^2]]], {x, -1.1, 1.1}, {y, -1.1, 1.1}, ColorFunction -> (Opacity[#, Blue] &), Frame -> False] This ...
113 views

### Why does an inert ReplaceAll modify this Dataset?

I cannot see any reason for this behavior besides a bug, but I've been wrong before so I put it before the community: ...
69 views

### Appending elements to a list in parallel table

Is there any way to store values in a list that is being computed in parallel? For example, if ParallelTable is computing some ...
44 views

### Preserve Dataset for single column and single result instead of returning List

For consistency I would like the results of Select and similar operation on Datasets to always return a Dataset object. If you query a Dataset and the result is a single column or a single value a ...
237 views

### Problem about an ant walking up a hill

An ant is walking up a hill given by $f(x)$. At what point can it see a blade of grass. I've been working on this problem with Mathematica and by hand. Help with either would be fantastic. The ...
57 views

### Creating a lazy evaluator of the lambda calculus

I have a sub project in my research to write a lazy evaluator of the lambda calculus. How should I approach this problem? I already have a implementation of the lambda calculus in another language. ...
63 views

### Solving Recurrence equation for n

I have a recurrence equation $t_n$ which is defined as $$t_n=2.5t_{n-1}-1.5t_{n-4},\qquad \text{for }n\geq5$$ Where  \begin{align} t_1&=5\\ t_2&=10.5\\ t_3&=26.25\\ t_4&=62.625 ...
122 views

### Contract two lists

Suppose I have two lists of the equal length in the form powers= {{rho th},{mu},{beta},{nu},{r},{}} ...
173 views

### How to display MeshRegion without vertices

I'm writing a library for handling very large and complicated (boundary) mesh regions on the order of ~150,000 vertices, ~450,000 edges, and ~300,000 triangles. The regions themselves are the cortical ...
59 views

...
218 views

### Why these ways of defining a function with variable number of arguments fail?

First: I know about the correct way to define a function with variable number of arguments: Clear[f] f[s__] := Plus[s] f[1, 2, 3, 4] (* 10 *) BUT I ...
25 views

### Iterating a model with 2nd order difference equations using Manipulate [duplicate]

I have a model including first and second order difference equations. It works for the case of first difference equation, which is below: ...
82 views

### Time inhomogeneous Markov Chain in Mathematica

I would like to create a discrete 2-state Markov process, where the switching probabilities in the transition matrix vary with time. I can currently do the following, which creates a process with ...
88 views

### Replace expression in series expansion [duplicate]

A test case: I'm trying to replace an expression inside a series expansion: Series[f[x],{x,x0,4}] ./ (x-x0)->h but it still returns ...
50 views

### Is the use of StringTemplate with a styled string documented behavior?

I was pleasantly surprised to find out that StringTemplate appears to work with styled (formatted) strings, with the style of the slots applied to the inserted ...
39 views

### Retrieving a Portion of Webpage Code using URLFetch

The URLFetch command is very useful for pulling the entire html source of a given webpage, however, if one wanted to speed up the process, by only requesting a ...
106 views

### Adjusting contrast of a color scale with ListDensityPlot

I am using ListDensityPlot to plot data of the form {{x1,y1,z1},{x2,y2,z2}, …}. It results in the plot shown below. But I'd like to adjust the color scale contrast to better show the variations in ...
124 views

### NDSolve grid refinement for PDEs

I am experiencing trouble when trying to solve a PDE for various parameter values within mathematica: The PDE in principle can easily be solved numerically, however the stepsize of the spatial ...
225 views

### Automatically convert pairs of directed edges to an undirected edge?

I have a directed graph, which for some pairs of vertices, has a directed edge between them in each direction. I would like to replace such pairs of directed edges between the same vertices but in ...
58 views

### Goto and Compile to C

When I use Goto inside compile and use CompilationTarget->"C" I get error message: ...
64 views

### combine two ParametricPlot3D plots

I have the following parametric equations ...
35 views

### Error with AppendTo [duplicate]

I am trying to write a function that builds a graph, or - better said - adds a layer of leaves to a pre-existing graph. Basically, I hand to the function three lists. ...