All Questions

3
votes
1answer
307 views

Turn list of edges into a polygon function

I have a list of coordinates that define the edges of a polygon and I would like to get a function defining the area Inside out if it (The polygon is convex and the points are in order) So that for ...
5
votes
1answer
206 views

Numbered symbols

I work with an exterior algebra over $R^n$. I have the basis $\{1,\omega_i\}_{i=1}^n$ in this algebra, and my differential operator is defined as $$d\omega_k=\sum_{i>j>0,i+j=k} (i-j)w_i\wedge ...
4
votes
2answers
258 views

How to create 'help' `?` for a function (as documentation)

I have defined a function PassVeltB in some complicated way. But now I would like to add a little documentation that gives the user information on how it is to be ...
1
vote
1answer
160 views

Random sample with gap sizes

Lets say I have 101 instances of data with multiple attributes. In particular case, one attribute has 7 unique values. I want to get ...
11
votes
6answers
4k views

Finding the centroid of the area between two curves

When I have an area bounded by curves, is there a built-in way to find the center of the area? Or do I have to plot it first and then use ComponentMeasurements on ...
12
votes
1answer
499 views

How can I obtain a zero-filled Fourier transform, as produced by MATLAB's fft?

The MATLAB FFT function, fft(X,n), can be used to return the n-point DFT. This effectively extends the original signal, X, to ...
9
votes
1answer
180 views

StringMatchQ and Alternatives throws message in init.m

The report of this issue, which itself relates to code of my answer here, exposed a behavior I cannot explain. If I use StringMatchQ in combination with ...
10
votes
2answers
2k views

Mathematica9 linux version crash, how to fix it?

Ubuntu 12.04 x86_64 kernel 3.2.0-35-generic Mathematica 9 linux version (x86_64) crashes with errors: X Error of failed request: BadGC (invalid GC parameter) Major opcode of failed request: ...
4
votes
1answer
500 views

How do I use RSolve to solve a system of recurrence relations?

I am trying to solve a system of recurrence relations as follows. ...
4
votes
1answer
223 views

Why does MemoryConstrained not abort when memory limit is exceeded?

I thought I had an idea that might lead to an answer to @yohbs' question, but as I was trying to check out the usage of MemoryConstrained[expr,b,failexpr], I ...
2
votes
1answer
876 views

Problem with SphericalPlot3D plotting

I want to plot the real part of the SphericalHarmonicY[1,1,θ,φ]. That is, I want to plot $$ - \frac{1}{2}\sqrt {\frac{3}{{2\pi }}} \cos[\phi ]\sin[\theta ]$$ To ...
13
votes
4answers
910 views

Domain Coloring

My next project I'd like to start working on is Domain Coloring. I am aware of the beautiful discussion at: How can I generate this "domain coloring" plot? And I am studying it. However, a ...
9
votes
2answers
950 views

Mathematica Package for Bayesian Networks

Are there any packages that allow the simulation of Bayesian Networks with Mathematica? I found what seemed to be a promising package (Dynamics) on a Brown University URL, ...
6
votes
1answer
368 views

Export graphics in parallel

I run a heavy simulation, using NDSolve and the method of lines. This means that the result of NDSolve is a list of, say, ...
46
votes
2answers
4k views

What is the difference between Reduce and Solve?

Solve and Reduce both can be used for solving equations. Just by working with them, I know there are some differences between ...
25
votes
2answers
842 views

Cleaning mildew from old documents using Mathematica (Image processing)

While visiting family over the holiday period, I managed to have some good mother-daughter bonding over how far back I’ve managed to trace the family tree (Mom is in her 80s and doesn’t do computers). ...
7
votes
1answer
234 views

how can I avoid CPU waste (by master kernel) using WaitNext?

I'm using WaitNext in Mathematica for parallel processing on Mac OS X. I have 4 processors on my MacBook and LaunchKernels[] ...
2
votes
1answer
266 views

making a TreeGraph VertexLabel that contains a text label and also a Tooltip?

I am trying to make a TreeGraph[] that has as labels for vertices both text and Tooltip. The text displays all the time, when the TreeGraph is plotted, and in ...
7
votes
3answers
336 views

Adding a label to an expression result

To make my notebook easier to read for non-Mathematica literate colleagues (myself included), I'd like to have the output from an assignment expression look somewhat more obvious. Normally an ...
4
votes
1answer
386 views

Using DistributionFitTest on custom distributions in Mathematica 8

I originally posted this question on Stack Overflow, but I didn't get any answers, and I'm hoping to have better luck here. I'm trying to compute the goodness-of-fit of a bi-modal Gaussian ...
16
votes
3answers
320 views

What does None mean in a control specification for Manipulate?

I am now struggling to understand code that contains the following (simplified) Manipulate structure. ...
2
votes
3answers
273 views

How do I construct a pure function to extract data fields from records that are strings?

How can I get from data segment format to the final segment format with a pure function? The data fields are fixed length. There are no separators between the fields. a) list ...
4
votes
1answer
129 views

Functional Programming: modify EdgeList based on condition

I have a simple functional programming question: I have a simple EdgeList defined in Mathematica, I would like to modify the value of certain element of the list based on a condition. I see how to ...
8
votes
3answers
508 views

Fast Sieve Implementation

I'm going to write a code to compete in performance with NewPGen. The goal is to sieve numbers that have small factors. Mine is very slow in compare with NewPGen. Here's my code: ...
3
votes
3answers
227 views

Why does my code work one way in Mathematica and another way in PlayerPro?

I wrote the following simple code and deployed it as a CDF. Button["Ok", (SystemDialogInput["FileSave", ".PDF"])] If I ...
1
vote
0answers
152 views

Exp[I θ] + b Exp[-I θ], Part II [duplicate]

Possible Duplicate: Manipulate Exp[I θ]+b Exp[-I θ] Thought it might be best to add another question. Not sure my comment would be seen in the original question. My question is: How do we ...
1
vote
3answers
826 views

How do I combine the data from two tables according to a rule of my own devising?

I have two matrices a = m x 5 and b =m x 5 (m is large, say 1,000) which are already sorted as below: How to generate a new matrix c = m x 5 which consists: Column 1: exact replica of Column 1 ...
8
votes
3answers
760 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 ...
-1
votes
2answers
404 views

Correct way to compare arrays and do conditional evaluations

I would like to compare two arrays a=: and b= and get: using: (b/.(b_?Positive->a+b))//MatrixForm but this doesn't seem to work? Can ...
1
vote
0answers
61 views

Using lists as optimization parameters [duplicate]

Possible Duplicate: Minimizing a function of many coordinates Suppose that the function $F[\vec{x}]$ computes a certain polynomial of the elements of the list $\vec{x}$. How can I use ...
10
votes
1answer
537 views

How to get zeroth-order (piecewise constant) interpolation of scattered data?

Given a collection of scattered data points in 2D and associated function values, data = RandomReal[1, {100, 3}]; we can get a piecewise linear interpolating ...
8
votes
3answers
346 views

Radon function result's repeatability

I want to get a Hough transform of some edged image. When I compare the same transformation on the same image I got different results. ...
12
votes
4answers
495 views

Can you recommend an efficient method for finding the least integer satisfying my inequality?

I tried find the minimum make $\frac{1}{2}+\frac{1}{2+\sqrt{2}}+\frac{1}{3 +\sqrt{3}}+...+\frac{1}{n+\sqrt{n}}>15$ Following code is so slow when I use condition ...
8
votes
5answers
414 views

Manipulate Exp[I θ]+b Exp[-I θ]

I've uploaded an image showing a demonstration I'd like to create, but I definitely need help. There is a lot of talent on this list, so maybe someone can help me get started learning how to add ...
1
vote
2answers
270 views

How to generate patterns by a list of integers

I have a list of integers {3,4,2,2}. This list will give patterns {x_,_,y_,y_,_,_,z_,z_,w_,w_,x_} and ...
10
votes
1answer
2k views

Image Processing: Finding Orientation and Position of Symmetry Axes

Background I'm currently toying with Principles of Design by Charlotte Jirousek in order to learn some basics of image processing. As main principals she suggests Balance, Proportion, Rhythm, ...
6
votes
2answers
816 views

How can I recreate Trott's Riemann Surface plot in Mathematica?

In reading Michael Trott's Visualization of Riemann Surfaces of Algebraic Functions, he has: ...
40
votes
4answers
2k views

How to visualize 3D fit

I have a data set of x,y,z values and I fit a function of x,y to the data. This works, but I can't come up with a nice way to ...
3
votes
1answer
342 views

How to assign graph-node label as node value?

I am facing the following problem: I need to work on several already-designed graphs, accessible in ".DOT" format. Mathematica can perfectly read these graphs, however because the nodes of the graphs ...
9
votes
2answers
453 views

How to represent a list as a cycle

I want to select distinct cycles (represented by List). The cycle {a, b, c, d} must be the same as {b, c, d, a} or ...
1
vote
1answer
397 views

Combining two pure functions

How to get from the following intermediate result to the final one with just one pure function? ...
3
votes
1answer
228 views

Write and Read to StreamPosition

One OutputStream and one InputStream are opened on the same file: ...
-3
votes
1answer
267 views

How can I make a barchart?

I want to mimic the below image type using Mathematica's BarChart3D function. For this purpose I wrote the following code but it isn't working. ...
8
votes
2answers
375 views

Precision differences

I run this sum and get the symbolic answer below : Sum[ (1/(k^2 - k) - 1/k^2), {k, 2, Infinity}] $2 - \frac{\pi^2}{6}$ I look up the sequence on OEIS and ...
0
votes
0answers
677 views

Multiple ranges in one plot [duplicate]

Possible Duplicate: 1 Plot, 2 Scale/Axis Generating a broken or snipped axis in ListPlot I have data in several ranges which I, when I plot together, is not very useful. I was thinking ...
0
votes
0answers
64 views

Mathematica Workspace [duplicate]

Possible Duplicate: Is there equivalence within Mathematica to view currently used variables similar to Matlab? In Matlab, I can type: ...
6
votes
1answer
177 views

How to edit a HYPERLINK once created inside a notebook?

When a hyperlink is created in a notebook, there does not seem to be an easy way to actually edit the hyperlink (maybe to correct the URL). To make some text HYPERLINK, one selects the text using the ...
2
votes
1answer
237 views

Dynamically updating interactive objects in Mathematica

Is it possible to create interactive code in Mathematica (via EventHandler[] or Manipulate[] perhaps) that continually updates some calculation based on external data in the time when no user input is ...
12
votes
3answers
1k views

How do I emulate MATLAB's comet plot?

I have tried the following code: ParametricPlot[{Sin[12 u] Cos[u], Sin[12 u] Sin[u]}, {u, 0, 2 Pi}] and it produced the following image: MATLAB has a ...
3
votes
1answer
331 views

How can I export specific data into different pages in .PDF format?

I have made various Grid-s and arranged them column-wise in another Grid. All Grids are ...

15 30 50 per page