11
votes
2answers
973 views

Finding a Concave Hull

I have a 3d clustered data: Is there any other way to get concavehull of 3D data points?
11
votes
3answers
1k views

Computing the genus of an algebraic curve

How-to compute the genus of an algebraic curve in Mathematica ? In my case the algebraic curve is explicitly defined by a polynomial.
10
votes
2answers
420 views

Dynamic Programming with delayed evaluation

By using dynamical programming, we can save intermediate steps for recursive relations, as in f[n_]:= f[n] = f[n-1] + f[n-2] However, this only stores ...
10
votes
1answer
467 views

Mathematica Functions from VBA

I'm trying to call Mathematica functions from VBA (Excel) using .NETLink without success. (Yes, I know Mathematica Link for Excel exists. And yes, I know the proper thing to do is buy it. However, ...
10
votes
1answer
557 views

Count Elements in Image

I have the following image: img1 I'm trying to count al these colored cells and draw a circle around them. I really don't now how I can use SelectComponents for ...
10
votes
2answers
254 views

Dependent Manipulate sliders

I would like to use dependent sliders in Manipulate. First slider K0 should be independent and varied from ...
10
votes
3answers
939 views

Correcting a correlation matrix to be positive semidefinite

Does Mathematica have a way to "fix" a correlation matrix that is not positive semi-definite? I looked through the documentation and search the internet but could not find anything.
9
votes
1answer
878 views

Making a Stock Options Database in Mathematica

I am trying to use Mathematica to create a stock options database of sorts. That is I wish to write a function that imports the option chain of a given stock. Unfortunately Wolfram has yet to put ...
9
votes
1answer
215 views

Preserving indentation when creating a new line (when editing in a package)

Background: This is the third question in a row of questions about how to make editing packages in the front-end much more bearable (the other two are here and here). It seems that the front end is ...
9
votes
2answers
300 views

Is it possible to set a timeout for LinkWrite[]?

This came up in relation to this answer Is it possible to set a timeout for LinkWrite? LinkWrite seems to block until the sent ...
8
votes
7answers
679 views

How to partition a list in a specific way

I have a list: a = {{1, 2, 3, 4, 1, 2, 3, 4}, {5, 6, 7, 8, 5, 6, 7, 8}}; Using Partition and ...
8
votes
1answer
1k views

Solving an ODE in power series

How do I find a series solution to an ODE? I do not mean taking the Taylor series of an exact solution; I want to solve nasty nonlinear differential equations locally via plug and chug. Surely, that ...
8
votes
3answers
706 views

Applying an ArrayPlot as a texture to the surface of a cylinder

I would like to apply a matrix plot to the surface of a 3D cylinder. The matrix plot is the output from a custom cellular-automata, and it would be nice to see the lefthand side of the plot connected ...
7
votes
3answers
465 views

Smoothing ListContourPlot contours

I have some data of type {{x1, y1, f1}, {x2, y2, f2}, ...} and want to do ListContourPlot. However, there is a problem that the ...
7
votes
3answers
153 views

Converting StringJoin to StringForm inside Hold

Let's say I have a piece of code: Hold[{code1, "asdad " <> ToString[testa] <> " adsd " <> ToString[testb], code2}] (*MWE ofc*) ...
7
votes
2answers
3k views

Equation of a line that is tangent to a curve at point

A common problem in the derivative section of calculus texts is "find the equation of the line that is tangent to the curve $y = \ldots$ at the point $P$." To find the line that is tangent to $y = 2 ...
7
votes
2answers
476 views

How to apply restrictions to the “integrated” variable, when using NDSolve?

I have to integrate an energy along a path. I know the energy at the "beginning" of the path (energy[0]), and I can determine the energy change (gain and loss) ...
6
votes
3answers
1k views

Simulate MATLAB's meshgrid function

Here is MATLAB's meshgrid. I came up with these implementations in Mathematica: ...
22
votes
4answers
2k views

How to find the period of an arbitrary mathematical function?

Is there a function to find the period of an arbitrary (possibly complex) function in Mathematica?
19
votes
5answers
1k views

Morphing Graphics, color and location

I would like to make a small animation : 1-We start with a random distribution of gray points : ...
18
votes
5answers
435 views

How to split list into disjoint lists?

I wonder if there is any simple way to split a list into its disjoint sublists, e.g. from list={{a,b},{e,f},{b,c},{c,d},{f,g,h}} get a result ...
18
votes
2answers
317 views

The dangers of SaveDefinitions — should this really happen?

I have been bitten hard by SaveDefinitions -> True. I'll describe in detail what happened below. My questions are: Is this a bug? What is the most convenient ...
18
votes
3answers
1k views

How to make hollow polyhedra?

I found a version of the Mathematica spikey in 3D printable format (STL) at the Shapeways site that was hollow. Here it is when viewed in MeshLab: You can see there's a bit cut out of the end, and ...
17
votes
3answers
1k views

Finding the centroid of a disk in an image

I got about 100 images of the sun and have to find the centre of the star in the images. I have binarized the images and used ComponentMeasurementsto find the ...
16
votes
0answers
297 views

How can I make a notebook with two column layout?

How can I make a notebook with two column layout? Is it possible? I saw something tools could do such thing? Author Tools?
16
votes
6answers
567 views

How do I replace a missing value in a column with the value immediately above throughout a table?

I have a large table (7000 rows × 17 columns) of terse textual data. In many of the columns, empty entries have been replaced with "." as a marker. Working from the top of the columns downward, I want ...
16
votes
4answers
727 views

How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
16
votes
2answers
581 views

Exporting a dashed plot with a color gradient to a vector graphics format ruins the dashing

When exporting a dashed plot with a color gradient to a vector graphics format such as EPS or PDF, the dashing is partly ruined. For example, this command: ...
16
votes
3answers
758 views

Listing the functions defined in a package

Assume that I know a package's (Context?) name that is loaded. Now I want to list the functions defined in this package. How can I do it? I remember that I found a way once, but I cannot re-find it. ...
16
votes
2answers
578 views

Built-in Mathematica data: are they cached? how to speed up the loading?

Mathematica has numerous built-in data for science and math. Every first call to a data function in a new Mathematica session will "re-initialize indices" (download the data). Is there a way to store ...
15
votes
2answers
480 views

How can I add a column into a existing Dataset?

I'm very excited about the brand new Dataset function. I have played with it in Wolfram Cloud, and haven't figured out how can I add a new column into an existing ...
15
votes
1answer
185 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 ...
15
votes
3answers
709 views

Opening a context menu (with the Menu key)

Is it by any chance possible to make the Menu key work as one would expect in Mathematica: opening a context menu? The Menu key does nothing in version 7 or 8 on Windows.
15
votes
1answer
437 views

How to work with characters from CJK Unified Ideographs Extension B correctly?

Background: Recently I'm trying to deal with some Chinese characters which belongs to the CJK Unified Ideographs Extension B block. The motive comes from some further interest following a former ...
14
votes
1answer
288 views

Method -> {“AxesInFront” -> False} for Graphics3D

I'm aware of two ways to manage positioning of Axes for Graphics3D: AxesOrigin and ...
14
votes
1answer
440 views

Creating a R DataFrame like construct in Mathematica

I kept getting my data mixed up so I decided to see if I could construct a package adding a R DataFrame like construct to Mathematica. I managed to cobble something together that sort of works, but ...
14
votes
3answers
539 views

How can I improve my code for drawing a tree?

This code draws a tree, but it's not in the functional style. ...
13
votes
2answers
660 views

Numerical partial derivative

For a one-variable numerical function, it's simple to calculate the derivative at a point with Derivative as Szabolcs has pointed out before: ...
13
votes
5answers
443 views

Using ReadList and Skip to read a file with periodic alternation of useful and useless data

I am trying a read a file that's arranged such that there's alternating set of rows containing data that I don't need and data that I need. So for my case the first n lines in the files are useless to ...
13
votes
5answers
4k views

Standard deck of 52 playing cards in curated data?

I am not sure how to find out what all is included as curated data. For example, are the individual images of each of the 52 cards in a standard deck of playing cards included? If not, is there a way ...
13
votes
2answers
777 views

Speeding up random walk for many particles

I am trying to speed up this code for many particles to take a random walk. I'm not sure why it is so slow for such a simple task. I got a few hints from colleagues to reduce the precision of the ...
13
votes
3answers
1k views

Filtering pixels of a certain color

What is the best way to filter an image so that only the pixels close to a certain color are left? I've downloaded some satellite images from the web where a specific pixel color corresponds to a ...
13
votes
5answers
695 views

How to thread a list

I have data in format data = {{a1, a2}, {b1, b2}, {c1, c2}, {d1, d2}} Tableform: I want to thread it to : ...
13
votes
1answer
236 views

Usage displays properly only after second call

If I have a usage message containig two-dimensional stuff (subscripts or formulas) and I call the usage, then sometimes I get an improperly formatted output enclosed in "...". Linebreaks are gone, but ...
12
votes
2answers
411 views

Need help coding/creating a recursive list

I have two lists A and B, each with 99 real numbers. I want to form a list, C, whose ...
12
votes
1answer
222 views

Is there a way to get AbsoluteTime to correctly report absolute time differences?

Absolute time supposedly reports the "total number of seconds" between two dates, but it does not. For example because of the leap second applied at 2012-06-30T23:59:60Z ...
12
votes
2answers
467 views

How to monitor the progress of Read?

I use f = OpenRead["largefile.m"] x = Read[f]; Close[f]; to read in a Mathematica expression from a large file largefile.m ...
12
votes
2answers
324 views

Internal “Periodical” functions in version 7

In version 7 there exist these Internal` context functions: ?Internal`*Periodical* ...
12
votes
1answer
12k views

How to express trigonometric equation in terms of of given trigonometric function?

How can I express a trigonometric equation / identity in terms of a given trigonometric function? using following trigonometric identities ...
11
votes
1answer
271 views

What are all the named Mathematica styles?

This question came to mind because of this answer to a recent question. Under Style, the Mathematica Documentation Center says the following about named styles. A few common named styles ...

15 30 50 per page