# All Questions

74 views

### One more question about Assumptions and Integrate

There are many questions about assumptions here. Many of them are problem specific. That is why I want to ask a question in the most general way. Why does Mathematica solves this ...
239 views

### Simultaneous equations

I am trying to solve two simultaneous equations that are claimed to have 145 solutions but I believe they have 143, I want to check I am right before sending an email to my professor. Mathematica is ...
267 views

### Plotting a line segment from the degenerate case of an ellipse [duplicate]

An ellipse degenerates into a line segment when the defining constant distance from the two foci is the actual distance between the two foci. The ellipse closes into a line segment. The following ...
144 views

### Problem importing individual frames from QuickTime file

I am having difficulties with a code I am trying to run. Essentially I want to Read in a large .mov video file (60000+frames). ...
601 views

### Remove list elements that contain NaN Symbol [duplicate]

I have a long list of lists ...similar to g = {{1,2,3},{4,2,7}, .....{1.2,9}}. Occasionally, g contains elements like ...
103 views

### Connecting a vertex to middle of an edge with GraphPlot?

using GraphPlot I'd like to make directed arrow connecting a vertex (node) to the middle of an edge but couldn't find a way. Is this even possible using GraphPlot or other graphics-related commands in ...
134 views

### How do we make a negative integer out of a string of a negative number and vice-versa?

Negative numbers are not taken into consideration by mathematica's built-in functions. FromDigits["-2"] Gives me this message: ...
332 views

### Trouble using If[] within TabView Manipulate control

If I place an If in the "body" of a Manipulate as in: ...
563 views

### How to randomly erode a 3D distribution of points with Mma 7.0?

Suppose we have a 3D distribution of points, like the spherical ball example below : ...
159 views

### How to keep labels inside the box in BarChart3D

The following code ...
149 views

### Product of non-zero elements in sparse array

How can I multiply the non-zero elements of a SparseArray? Example: ...
2k views

### How is the dimensionality of an OpenCL problem specified?

When writing an OpenCL kernel, calls to get_global_id() are used to determine the "position" within the problem that a particular instance of the kernel is working ...
135 views

### Integration of DiracDelta

I just came across the following curiosity and I'm not sure whether it's a bug or just me missing something. Here's a minimal example: I defined the following "function" ...
696 views

### Use Euler method to solve differential equation

Use Euler's Method or the Modified Euler's to solve the differential equation ${dy/dt=y^2+t^2-1, y(-2)=-2}$ on $[- 2, 2]$. Take h = 0.2 (...
115 views

### Selective deletion of nested list elements centred around a certain value

I have a list which looks like: ...
545 views

### Drawing a shape on the mesh of a Plot3D [duplicate]

My question pertains to modifying the output of a typical Plot3D object, and overlaying a 2D shape, like a circle, on the 3D surface. Thinking of the surface as a stretchy surface, I want to put the ...
431 views

### Summing Normal random variables

I would like to plot the graph of the sum of two random variables.So, I wrote Plot[PDF[NormalDistribution[0, 1]+NormalDistribution[0, 1], x], {x, -10, 10}] Why ...
149 views

### string to complex number

Consider the following list MyList= {-0.0000396, -0.0000187167, "0.10259130990561813-0.0677132394802944i"} Head /@ MyList (* -> {Real, Real, String} *) In ...
498 views

### Comment color in a notebook

My requirement: Comments should appear within a notebook in blue and font size 12 and in Courier by default. This should work on not just my machine (by tweaking the preference of MY Mathematica) ...
87 views

### How to keep track of notebook dimensions

I want to create a cell that will resize automatically if the notebook is resized. I was hoping to find some function called NotebookDimensions[], and use it dynamically.
132 views

### Mathematica can't simplify ellipse-related trig equation over reals?

f[t_] = -4 + Sqrt[(-Sqrt[3] + 2*Cos[t])^2 + Sin[t]^2] + Sqrt[(Sqrt[3] + 2*Cos[t])^2 + Sin[t]^2] The function above is identically 0 for all real values of t. ...
228 views

### How to compute the residue of $e^{z-\frac{1}{z}}$ at z=0?

I've tried the following but it didn't work: Residue[Exp[z - 1/z], {z, 0}] not even this: Residue[Exp[1/z], {z, 0}] ...
861 views

### Fastest way to check for List membership

I have a set of say 100 numbers {1,3,7,11,19,...3971}. All elements are previously determined. I want to check whether ...
2k views

### How do I plot a proper streamline plot, including spacings and line endings?

Mathematica includes two nice built-in tools to visualize vector fields, VectorPlot and StreamPlot. The latter is a useful tool, ...
111 views

### How to align cells in a grid?

I would like to align the text in the gauge such as the label "AKs" is in the center of the gauge and the value (60) is in the upper right corner with a smaller font. How can I achieve this? I tried ...
717 views

### How to run mathematica scripts without initializing the kernel every time

I have written a Mathematica script that is to be run periodically on a Raspberry Pi. The code takes about 3 seconds to execute if I test it in a CLI Mathematica session. However, when I execute the ...
86 views

### Error when solving equations constructed with Table [duplicate]

I have a couple of questions about the problem I am trying to solve ...
163 views

### Optimizing my code to generate symmetric tensors

I have written code that does carries out the following task: Construct a fully symmetric rank-$P$ "tensor" out of a collection of user-input rank-1 vectors, and a rank-2 symmetric tensor $h$. The ...
195 views

### trouble with Dynamic range in SetterBar

It appears that I can set the range to a Dynamic variable in a Manipulate control, but not in a ...
579 views

### Circle detection using invariance kernels

I'm not sure, if this belongs more to the signal processing forum or if I can post it in here, but I want to solve it via mathematica and it's some kind of image-processing I guess. I have a noisy ...
285 views

### Question about Map and Total

Suppose I have a list and I want to generate a new list, such that $$NewList[index] = \sum_{index \neq j}^{NumOfElts} \frac {1}{ \lvert OldList[index]-OldList[j] \rvert ^2 }$$ Can I do it using ...
149 views

### How to open directly the help/reference window from a notebook

I'm used to do ??symbol when I want the reference for a given symbol, then I click on the >> arrows to open the help window. Would it be possible to ...
209 views

### Global vs local adaptive integration: lattice propagator

I was doing the first exercise in the paper Lattice QCD for Novices. This is the expected result: With the default "GlobalAdaptive" method for NIntegrate it threw errors saying that the error had ...
274 views

### Problem with Creating Mathematica Package

Currently I am working on creating the package on Mathematica version 9 on Windows 7. Here is my code as follows: ...
96 views

...
184 views

### Mathematica can't find constants for this differential equation

I am having problems solving this differential equation: diffeq = m x''[t] == -a E^(b*x'[t]); sol = DSolve[{diffeq, x[0] == 0, x'[0] == v0}, x[t], t] The output ...
105 views

### How can I get a fully functional FittedModel when fitting data to a pointwise function?

When I am fitting data with a pointwise function using NonlinearModelFit, the produced FittedModel fails to calculate variances ...
279 views

### Unwanted PlotMarkers appear at non-existent places

Bug introduced in 7.0 or earlier and persisting through 10.2.0 In this simple code ...
1k views

### Green's Function in Mathematica

The equation I am trying to solve is: $$q \, T_1''(x)-T_1(x)(f-b \, g+i\,w \, p)=T(f_1-b \, g_1)-g_1\tag{1}$$ My professor says that $(1)$ can be solved by using Green's function $G(x,y)$, where ...
81 views

### Produce a 1-dimensional list of all unique matrix elements

We have some symbolic matrix m, e.g. m={{1, x, 4 x + y},{0, x y + 4x, 4x},{7 x, x, 4x + x y}} and we want to produce as output a list of all the unique elements ...
126 views

### Why does initialization slow down manipulate in this case?

I'm trying to manipulate a plot of function with some parameters. The function is a long expression, so I tried to put it inside the Initialization options of ...
70 views

### Supply parameter values in NormFunction of FindFit

As I understand the input to the NormFunction is a list of residuals. Is there a way to get parameter values into the NormFunction as well? I ran into a problem where the norm depends on the values of ...
370 views

### Extracting coefficients from multiple equations and generating coefficient matrix

after 6 hours reading about string patterns, string manipulations and trying ..and trying..I officially give up (for now) and ask for some help. I have some unorderly equations you will find here ...
562 views

### How to generate this fractal-like 3D distribution of points in Mma 7.0?

I would like to produce some 3D distributions of points using Mathematica 7.0, that look like the picture below : How could I do that ? What are your suggestions ? What Mma 7 codes could do a ...
252 views

### How to read non-standard-format data into Mathematica from a file

I would like to read non-standard-format data into Mathematica from a file. How can this be achieved? For example, how can I read the following text file of data into Mathematica: ...
323 views

### Partial differential equation with initial conditions

And so I want to solve the following equation, subject to these initial conditions: $\ u_{tt} - u_{xx} = 6u^5+(8+4a)u^3-(2+4a)u$ $\ u(0,x)=\tanh(x), u_t(0,x)=0$ When I use NDSolve to solve within ...
1k views

### C compilation not working with Visual Studio 2013

I'm running Mathematica 9 on a 64 bit Windows 8.1 laptop. I'm having no luck getting C compilation to work. ...
220 views

### Plotting ContourLabels on ContourPlot3D

Is there a way to add ContourLabels on ContourPlot3D ? (tried in Mathematica 9) I tried doing the following code : ...