# All Questions

174 views

### Replacement variable in list plot

I would like the replacement: /. {ComplexInfinity -> 0} to be treated as a variable. I am trying to overlay the following list plots: ...
288 views

### Gram Schmidt inner and outer products

I know the Gram-Schmidt orthogonalization generates an orthonormal basis from an arbitrary basis. I need help with: Write a program that inputs a list $\{b_1,\dotsc,b_n\}$ of linearly independent ...
140 views

### Series expansion: Taylor series takes huge amount of time

I'm working on a notebook, trying to expand the root of a cubic polynomial in Taylor series. When I type: ...
2k views

### Speeding up Import and Export in CSV format

I am handling large numerical data in Mathematica. In smaller problems everything worked fine using Export and Import with the ...
258 views

### Is there a way to make the “Details” section of the documentation expand by default?

By default, the Mathematica documentation opens with the "Details" section collapsed. This is never what I'm looking for — in fact, I've lost count of the times I've sought help on a feature and ...
376 views

### Collecting terms of even exponents

Say I've got a polynomial of $4$ or $5$ variables (we'll say $d_1$, $d_2$, $d_3$, and $d_4$). How would you collect the terms where each $d$ is raised to an even power? It collects the terms of the ...
234 views

### How can I combine two plots that were created in different notebooks?

I have two different programs for simulating a system. when I get the results I have plotting result for each. now I want to combine both drawings so that I compare between them. I want to put both of ...
255 views

### Numerical errors/inaccuracies in ProductLog

Context In cosmology, a fairly accurate model to describe the gravitational potential, $\psi(r)$ of dark matter halos is given by $\psi( r)=\log(1+r)/r$. ...
485 views

### Is there a way to symbolically invert a piecewise function

I have a piecewise function that is continuous and strictly monotonic, like this: f[t_] = Piecewise[{{t/4, t < 0}, {t/2, t < 3}, {3/2 + (t - 3)*3, True}}] ...
45 views

### No output when a parameter changes [closed]

I am very new in Mathematica, but I cannot find out what is happening here, looking on the internet. I modified a previous notebook as follows: ...
168 views

### Plot[ D[Sin[x]] ] and Evaluate[] [duplicate]

Why does t = 2 Pi; Plot[D[Sin[x],x], {x,0,t}] (* Plotting the derivative of Sin[x] *) not work, but ...
415 views

### Fill circle layers with colors according to read values from a plotted curve

I want to read (temperature) values from plotted (cooling) curves and visualize them in layered circles. I have an example made manually for clarification: 3 plotted curves, at certain time steps ...
139 views

### Combining an imported PDB file with a set of Graphics3D objects

Imagine we import a PDB file like so (using the example from ref/format/PDB in the help directory): ...
137 views

### How to get control over DepthFirstScan?

Is there a way to conditionally take control the flow during a depth-first scan against a TreeGraph? I have a tree graph whose nodes are constructed as object, and there's a method ...
149 views

### Problem with exporting nested Rows/Columns to HTML

I will show the problem on the following MWE: Export["test.html", Column[{ Row[{"test", "1"}] }], "HTML", "CSS" -> None] ...
878 views

### How can I increase the number of polygons / resolution for this plot?

I have generated the following plot: Code: RegionPlot3D[ x^2 + z^2 < 1 && x^2 + y^2 < 1, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Axes -> False] ...
157 views

### Confusing font information from CurrentValue

I'm trying to programmatically get the width of a character in Mathematica's default fixed-width font, Courier. I believe CurrentValue holds the answer but I'm ...
150 views

### How to apply a tensor to a list of arguments

The problem I have is the following: Let C be a list of coordinates, say, C = {x1, x2, ..., xn} and ...
248 views

### Boundary effect of Graphics3D object Tube[]

I draw a Graphics3D object of two tubes: Graphics3D[{Tube[{{-0.2, -1, 0}, {-0.2, 1, 0}}, 0.05], Tube[{{0, 0, -1}, {0, 0, 1}}, 0.05]}, Boxed -> False] And ...
460 views

### Selecting morphological components by clicking on them?

This is a bit of a follow-up to a previous question: How can I merge multiple sets of morphological components (perhaps selected using different metrics)? I've run into a few problems recently where ...
549 views

### Incorrect result from Integrate

Bug introduced in 8.0 and fixed in 10.0 I attempted to calculate the following integral: ...
257 views

### Composition of functions using slots

Apolgies if this has been asked and answered, but I'm not even sure what to search for. I have two functions defined as follows: ...
271 views

### How to implement a formal expectation operator over an unknown distribution?

I need to do some simplification of an expression involving averages over a stochastic variable (in order to verify a long analytical calculation). The easiest way to do that, I figured, were if I ...
118 views

### How to extract data depending on Position of First zero?

I have a file (attached as an image) which I imported to Mathematica and only extracted the first and second column. My problem is that I want to extract the data beginning from the row where $A=0$. ...
130 views

### Problem evaluating results of DSolve (Power::infy)

So, after browsing through older posts to see if anybody else could have had the same problem, I have come to the conclusion that I am stuck. That bothers me, especially because it should be straight ...
215 views

### How to use Compile to efficiently apply a function to every element of a list

Let's say I have a list of random numbers; list = Table[Random[], {100000}]; I want to apply a function f in every element of ...
100 views

### How to combine DSolve and FindRoot

As my differential function is relatively complex I do not want to do the detour of finding an explicit solution via DSolve for it but rather use an FindRoot-like approach by guessing initial starting ...
186 views

### The UnitStep function and Intervals

For the input UnitStep[Interval[{-4, 5}]] I get Interval[{0, 1}] Why is this not ...
145 views

### Adapting old Arrow expressions

I have an old notebook that uses the now obsolete Arrow package. For example, I have an expression containing ...
46 views

### Function that puts zero after a certain decimal in every element of the matrix

We know that in Mathematica there is some default precision, which you can also change. This means, that after a certain decimal(fixed by the precision), the computer puts pseudo random numbers. I am ...
442 views

...
55 views

### Comparing large numbers [duplicate]

How can I compare really large numbers in Mathematica? I'm trying to compare: 2^4^4^4 < 4^4^4^4 It yields: ...
739 views

### Plotting a graph

Could anyone help me with plotting the following graph? Integrate (-Inf, Inf) (exp(-i*x*t))/((4*pi)((x-1)^2 +25)(exp(-100x) +1)) It's not a code obviously, but I ...
89 views

### Converting function into differential version

I am looking through a journal and I came across a function that I wanted to convert to its differential version using Mathematica. Would anyone be able to get the differential version by using ...
117 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 ...
123 views

### Exporting combined data plots as a PDF file [closed]

I am trying to export a graph similar to the one attached as PDF. I am having troubles with the error bars and legends. Is there a simple example someone can share and demonstrate how to do this?
59 views

### Evaluating a SmoothKernelDistribution at a point

I would like to evaluate the value of the following SmoothKernelDistribution at the location, say, 2.35. What is the right way to do it? ...
432 views

### Find maximum from NDSolve output

Here is my code: ...
157 views

### Save a sequence of images using table with 2D variables [closed]

How can I save a sequence of images with 2D variables using Table. I get a Iterator {r,{-1,-1},{1,1},{0.1,0.1}} does not have appropriate bounds. >> error ...
259 views

### Getting mesage: Set::setps assignment is not a symbol

Please, tell me what is the issue with the following code? Dimensions[Subscript[R, 2]] {201, 161, 53} ...
332 views

### Is matrix multiplication automatically done in parallel in Mathematica 9?

In good old Mathematica versions (5.2, 6.0), matrix multiplication was automatically done in parallel. For example, on an 8-core machine, define two square real matrices: ...
340 views

### Unpacked eigenvectors of complex matrices

Edit: This bug is fixed in Mathematica 10.0.0 I want to calculate eigenvectors of a Hermitian matrix. For example ...
254 views

### How do I define an argument pattern for a Head of NOT a given value?

I want to define a function f with an argument that matches only when an argument Head is NOT of a given value. I know I can define a pattern that matches the Head for an argument: ...
232 views

### How can I merge multiple sets of morphological components (perhaps selected using different metrics)?

Let's say I use SelectComponents to select morphological components in an image according to some criterion, like "Elongation". Then let's say, I pull out a ...
173 views

### Reverse engineer a sample value from a CDF

The image below shows the cumulative distribution of a normal distribution with mean = 4 and standard deviation = 1. Notice that if you have a value with a rank of 0.8 (meaning it would be 80th item ...
329 views

### How can I properly Partition “IntensityData” output from “ComponentMeasurements”? (Recovering the (x, y) dimensions of a rect. morph. component?)

When I ask ComponentMeasurements to return "IntensityData" for some set of rectangular morphological components: ...
132 views

Using Print[], I know it is possible to print out "helping text" to better understand a solution: Print["The solution is: ", x] if x holds some value. Now, this ...
330 views

### How to draw this kind of plot?

Apologies if the question is too basic; I've searched the manual and the web but couldn't find a solution. I would like to present some data on a discrete plot. The data is divided into $K$ series or ...