All Questions

7
votes
4answers
420 views

Defining a Unique Domain for Solving Diophantine Equations

I am working on a research problem in discrete geometry to do with sphere packings, and believe it or not, I have been able to reduce it to finding the solutions to the Diophantine equation, $$n = ...
9
votes
2answers
880 views

How to calculate mix of 4 colors defined in CIELAB L*a*b* model?

I have 4 colors that I converted from RGB to CIELAB L*a*b* model. How can I calculate mix of these 4 colors when I have (L,a,b) for each such color? How can I ...
4
votes
1answer
572 views

Computing Slater determinants

I need to compute Slater determinants. I'm wondering if I would benefit from assigning each of my functions to a variable prior to computation. I'm working with Slater determinants, but my question ...
5
votes
1answer
261 views

Accessing methods and properties of C++ objects?

Is it possible to access the properties or methods of C++ objects created with LibraryLink or MathLink like with J/Link ? Such capability doesn't seem built-in yet and I'm not sure it ever will as ...
7
votes
4answers
2k views

Checking if two trigonometric expressions are equal

Say I have two trigonometric expressions which are a bit complicated. Is there a quick way to check if they reduce to the same thing (that they are equal) using Mathematica? I was solving this: $y'' ...
4
votes
2answers
283 views

Returning Replacement Rules in a function and using it later on

I would like a function which returns replacement rules as some internal mathematica functions are doing and use the results in other functions. I could not find any information on that and I'm ...
16
votes
5answers
652 views

Is this the most efficient way to round approximate integers to integers while leaving other Reals untouched?

This might seem like an overly simple question, but I need to specify custom plot tick marks as integers (no trailing decimal point) if they are approximately integers, but not if they are not. Using ...
4
votes
2answers
789 views

A dot appearing after a zero, and making the entries of a matrix into fractions

For more info about the difference between 0. and 0 I am a self-taught Mathematica user and I have some elementary questions-- perhaps too elementary for this site, but here they are. If ...
14
votes
4answers
456 views

Easy button or hot key to switch between `Working` and `SlideShow` Screen Environments to avoid trip to menu

When I edit a slide show it easy to copy whole slides in Working Screen Environment but nice to preview slides in SlideShow ...
6
votes
2answers
220 views

How can I dynamically get a file whenever it is saved in Workbench?

I want to get a file once and only once at the start of a coding session. Then, whenever I save the file in the Wolfram Workbench, have it be gotten automatically. How can I construct such a utility?
3
votes
2answers
582 views

X label in GraphicsColumn is cut off

I'm trying to use GraphicsColumn to plot two curves with very different ranges. for example, ...
7
votes
3answers
546 views

Overlapping ArrayPlot

I have two ArrayPlots, and I want to overlap them as it is done here. For clarity, suppose ...
0
votes
2answers
313 views

DateListPlot FillingStyle problem

In the following query, If the option PlotStyle->{Red,Blue} is inserted it works but FillingStyle->{Red,Blue} does not: ...
17
votes
3answers
3k views

K-means clustering

In MATLAB, there is a command kmeans() that divides an array into $k$ clusters and calculates the centroid of each cluster. Is there any command in Mathematica to ...
5
votes
2answers
391 views

From a list of dates get a list of the last date available in a each month

I wondered if anyone has another or even a more direct way of finding the last dates of each month available from a list of successive dates? I currently do the following (note: nothing special about ...
8
votes
1answer
92 views

How can I defer the loading of a PopupView control until it is used?

Background: I have several PopupViews of which the loadtime adds to the startup time of a program. To improve the perceived performance I want to defer the loading ...
1
vote
1answer
205 views

Can I use Table without the appropriate bounds?

I´d like to use the Table command without defining n, so that I can have a list of n ...
5
votes
0answers
118 views

Calculating a limit with a result that is discontinuous in the parameters

The following limit is left unevaluated (Edit: added the assumption that $\epsilon$ is real thanks to the comment below): ...
19
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 ...
8
votes
1answer
212 views

SetPrecision within Block

I am reading Mathematica Cookbook, chapter 1. Author gives two examples, with the following explanation You can control precision within a complex calculation (without using ...
10
votes
5answers
396 views

How do you change the font size of a Manipulator label?

I have a stand alone Manipulator (it is not in a Manipulate) and would like to know how to alter the style of the label. There ...
12
votes
2answers
391 views

Anti-aliasing with the multiple-object form of Polygon?

Observe: rand = RandomReal[1, {4, 3, 2}]; Graphics @ Polygon @ rand Graphics[Polygon /@ rand] I am losing ...
31
votes
2answers
6k views

Image Shadow Removal in Mathematica

The task is: Image shadow removal is an important topic in image processing. If you feel curious about it, you may take a look here, or just google for it image shadow removal There are also a ...
17
votes
4answers
3k views

ListPlot with plotmarkers determined by point

I am trying to build on a simple example here: td = Prime[Range[25]] dsk = Graphics[{Blue, Disk[]}] ListPlot[td, PlotMarkers -> {dsk, 0.7}] How can I make ...
1
vote
1answer
212 views

How do I slice an image of size “width × height” in n² pieces of size “width / n × height / n”?

Background: What I want is to make a jigsaw from an image. (A simple one where the pieces are polygons.) I have the following strategy in mind. Create a set of polygons and assign images (or just the ...
4
votes
1answer
158 views

Sorting a list and finding an array of indices that sorts the list

How can I sort a list and also get a list of indices that sort this list? For example: primary list is a a={1,4,6,7,0,2}; sorted list is b ...
2
votes
2answers
479 views

Conditions for Piecewise[ ] Command

I am trying to plot a function in which is piecewise defined. I found the Fourier coefficients of this, and my question is how to define even & ...
7
votes
1answer
324 views

Customizing the Screen Environment

Is it possible to make Mathematica notebooks as stylish as this below with custom backgrounds and predictive text coloring? As shown in the snippet below? And possibly have the option to save the ...
6
votes
1answer
527 views

Evaluate continued fraction

Mathematica has the ContinuedFraction[] function to give the continued fraction expansion of a rational (or approximation of a real) number. I'm interested in the ...
6
votes
2answers
390 views

Passing unquoted strings (poor man's enumeration)

I would like to be able to pass an unquoted string as a parameter to a Mathematica function [that I am writing] and have it show up without evaluation if the string happens to be defined. Thus I would ...
7
votes
2answers
194 views

Why does Solve and Sum give different answers when according to Table it is the same sequence?

I have been thinking about a piece of code today, but I don't understand why I get different outputs from two in my mind similar Mathematical sums. First I observe that the Table command for this: ...
10
votes
3answers
1k views

Creating a Sierpinski gasket with the missing triangles filled in

I'm creating some questions for my math classes. The one below refers to the Sierpinski gasket. I found some great demonstrations to create the gasket. So that's good. Solving the problem is ...
48
votes
4answers
4k views

How can I generate this “domain coloring” plot?

I found this plot on Wikipedia: Domain coloring of $\sin(z)$ over $(-\pi,\pi)$ on $x$ and $y$ axes. Brightness indicates absolute magnitude, saturation represents imaginary and real magnitude. ...
3
votes
1answer
378 views

DateListPlot with two time list adding 2 labels, and setting the color of the label and lines in plot

This command will produce a chart with two lines on it. DateListPlot[{CapReg, Equity}, Joined -> True ] What I would like to do is add a label above the ...
11
votes
2answers
348 views

Should I use \\\“ or \” to match " in regex?

Both of the following return True: ...
2
votes
1answer
277 views

Table with dependent iterator

I'm trying to build a table where the iterator is based off of the ith-1 entry in the table. In other words, the value at i is based on a function with i-1 as its input. EXAMPLE: Let's assume we're ...
6
votes
3answers
654 views

Graph adjacency matrix with unconnected nodes

I am trying to display a series of 9x9 adjacency matrices which represent directed graphs on a 3x3 grid. The issue I am running up against is this (compounded by that fact that I don't really know how ...
8
votes
3answers
304 views

Faster Alternatives to DateDifference

I need a faster implementation of FractionOfYear and FractionOfMonth, which do the following: Input: A time/date specified by ...
6
votes
1answer
324 views

Mathematica Opens Each Session With Beep

First off, I am using Mathematica 8.0 and Mac OS X 10.7.4. Recently, when starting a new Mathematica session, I am confronted with an error beep and message window stating "The file you tried to open ...
0
votes
2answers
412 views

C interface for Mathematica

I would like to write a small C program which starts a Mathematica session, executes some user defined code and retrieves the output and finally quits the session. Basically I like to have a simple ...
5
votes
2answers
485 views

Cropped pdf file after export

I have plot generated by Plot[] function that I want to export to pdf file. The problem is that Export[] function somehow cuts a ...
3
votes
1answer
208 views

Exchange axes in ListLinePlot

I'm sorry to do this right off the bat, but I have the following set of data: ...
5
votes
2answers
230 views

Applying different color to result of a geometric transformation

Background: consider the following two snippets. ...
9
votes
1answer
376 views

Outline around sphere

Is there an easy way to draw an outline around a sphere? Is there something like EdgeForm[] that will work? I'm looking for perhaps a thick red line; I'm making a ...
1
vote
1answer
431 views

Interpolate specific columns of data

I have a txt file with 3 columns of data: x y1 y2 How do I import the file then create 2 functions, one interpolated with {x,y1} values and the other interpolated with {x,y2} values? This ...
7
votes
6answers
649 views

Using a built-in symbol as a variable

I want to produce a Mathematica Computable Document in which N appears as a variable in my formulae. But N is a reserved word in ...
12
votes
7answers
937 views

How to Set parts of indexed lists?

I would like to assign a list to an indexed variable and then change it using Part and Set like this: ...
2
votes
3answers
515 views

Output of plots from within Do[ ] Command

I am wondering why the following does not plot the way it's written and exactly how does the Do[] function operate? I think I could be using it incorrectly. ...
10
votes
1answer
205 views

Unexpected behavior of Compile, Return and ;

Could somebody explain why test = Compile[{{x}}, Return[x]; ]; test[0.] returns ...
9
votes
1answer
152 views

15 30 50 per page