1
vote
2answers
1k views

Cubic Splines Functions

I have this set of three data points and want the natural cubic spline functions for them: dat = {{-.0247500, .5}, {.3349375, -.25}, {1.101000, 0}}; I tried: <...
0
votes
0answers
28 views

Eliminate some value from a matrix [duplicate]

I have a function that return a table consisting of a 2D points. These points are either {x,y} or {0,0} ...
2
votes
1answer
519 views

add a scale bar to a microscopy image?

Is there any way to add scale bar to a image for example. I just need to add a bar and a text on top of it to all my images without having to rewrite ...
0
votes
1answer
134 views

change font size and circle the pointers

MWE ...
6
votes
2answers
258 views

Implement planar correction for skewed 3D profilometric data

I have some data that represents small-scale surface topography. The data is planar but not flat because it's impractical to level this microscope to a tolerance of microns. It looks like this: I'd ...
5
votes
1answer
310 views

measure minimum distance of dots from edge

I want to measure minimal distance of small dots from the edge of an image: Image of bright dots: Edge image ImageAdd looks like following:
1
vote
2answers
231 views

Does mathematica 9 on mac depend on these dynamic libraries?

The Mac package installing program "brew" suggests I remove some of these dynamic libraries, but I am worried that mathematica 9 might depend on them. As far as mathematica 9 is concerned, is it OK to ...
2
votes
4answers
154 views

Looking for mismatches between two lists

I'm able to do what I need, but it seems like there's always a better way. I have two lists, epiExcel and epiDB. Each has 3 columns and about 2,500 rows. I need to find out if the first 2 columns ...
1
vote
1answer
208 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: ...
1
vote
1answer
335 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 ...
2
votes
0answers
147 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: ...
12
votes
2answers
3k 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 ...
19
votes
1answer
286 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 ...
3
votes
6answers
482 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 ...
-2
votes
1answer
300 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 ...
4
votes
1answer
316 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$. ...
11
votes
2answers
632 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}}] ...
0
votes
1answer
202 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 ...
6
votes
3answers
473 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 ...
0
votes
1answer
196 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): ...
10
votes
1answer
148 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 ...
7
votes
1answer
156 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] ...
2
votes
2answers
1k 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] ...
4
votes
1answer
169 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 ...
1
vote
1answer
154 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 ...
11
votes
2answers
281 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 ...
7
votes
2answers
666 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 ...
20
votes
1answer
650 views

Incorrect result from Integrate

Bug introduced in 8.0 and fixed in 10.0 I attempted to calculate the following integral: ...
8
votes
2answers
289 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: ...
6
votes
2answers
335 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 ...
2
votes
2answers
123 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$. ...
0
votes
1answer
137 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 ...
5
votes
1answer
257 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 ...
0
votes
1answer
110 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 ...
3
votes
1answer
208 views

The UnitStep function and Intervals

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

Adapting old Arrow expressions

I have an old notebook that uses the now obsolete Arrow package. For example, I have an expression containing ...
1
vote
1answer
49 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 ...
8
votes
2answers
529 views

Goto and Compile

...
1
vote
0answers
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: ...
-2
votes
1answer
943 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 ...
-5
votes
1answer
92 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 ...
5
votes
1answer
119 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 ...
-3
votes
1answer
137 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?
2
votes
2answers
68 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? ...
4
votes
1answer
635 views
-1
votes
2answers
171 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 ...
0
votes
1answer
361 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} ...
6
votes
1answer
419 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: ...
17
votes
1answer
375 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 ...
8
votes
2answers
364 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: ...

15 30 50 per page