# All Questions

253 views

### What's a good style for inheriting Options[] of built-in function?

Options[myPlot] = Options[Plot]; myPlot[args___] := ... When defining a "wrapper" function like the above, I'd like it to inherit the ...
3k views

### How to print without having newline added automatically at the end?

Print["first part of the result", DateString[]] Print["addition to the result", DateString[]] will add a newline character at the end of line automatically for ...
1k views

### How to invert an integral equation

There have been numerous times when I've needed to invert an integral equation, i.e. I have something like $$f(x) = g_1(x)\int_{0}^x g_2(x') dx'$$ for arbitrary functions $g_1$ and $g_2$, and ...
2k views

### Open Excel file with Mathematica

I would like to open an Excel file and manipulate it as a COM object. While I'm able to open an instance of excel with ...
163 views

### Figuring out how AbsoluteOptions works with Graphs

I am puzzled by how AbsoluteOptions works with Graph objects. I would have expected that one could use it to obtain all the ...
2k views

### Mathematica slope fields

I would like to make a slope field. Here is the code ...
838 views

### Changing the order of elements in a chart legend

In a stacked BarChart or Histogram the bars are stacked from bottom to top, while the legend entries are listed from top to ...
530 views

### Surprises simplifying simple polynomials

I came across some somewhat surprising behavior of Simplify today, on something very simple. Let's take two cubic polynomials that we know have the same value: ...
620 views

### Command Completion

Note: As of version 9, this functionality is available and works out of the box. I've a few questions about Command Completion in Mathematica. I recently discovered this feature, and it's really ...
772 views

### Mathematica output format for big numbers

I need to write output of a Mathematica expression (a list of equations) in a file. I use ...
441 views

### Is there a faster way to create a matrix of indices from ragged data?

I have data that is given as a list of ordered pairs mixed with scalars. The pairs can contain infinite bounds. My goal is to convert the data into an index used in future computations. ...
664 views

### How to plot a barycentric line

I want to plot a barycentric function on an equilateral triangle (ternary plot). For example f1 = {Abs[Sin[x]], Mod[x, 2], Abs[Cos[x]]}; At the moment I evaluate ...
893 views

### How to scrape the headlines from New York Times and Wall Street Journal?

How to scrape headlines from New York Times, Wall Street Journal main pages to create datasets similar to this service? Importing HTML from nyt.com (HTML4) results in a ...
78 views

### Trouble using FindInstance with MatrixRank

I'm really confused about what's going wrong with my call to FindInstance: ...
1k views

### Determining the week of a year from a given date

Consider the following: AbsoluteTime["17/04/2012",{"Day","/","Month","Year"}]; From my calendar in my office, I know that April 17th is in the 16th week of the ...
90 views

### How to take several values out of a large expression?

Background: Consider the following graphics directive. ...
460 views

### How to recompute the layout of a Graph?

I asked a question about changing Graph properties in a similar way to how Show can change ...
1k views

### Rotating 3DPlot into animated gif

I'm trying to make an animated gif of a 3D plot by rotating the plot in its middle, around a vertical axis. I used the tricks gave by F'x and Heike in this thread autorotating 3D plot but I ...
203 views

### Graph does not accept Property Options

My question is concerned with the Graph functionality, which was newly implemented in Mathematica 8. I already used GraphPlot ...
169 views

### Create string from character code

Is it possible to convert a charcode/keycode to a string? I want to do this to create variables in a generated equation.
1k views

### ListContourPlot-ColorFunction

How can I use ONLY the central 90% of the spectrum, not the whole range? For example, I do not like to see the lowest values in purple, but in deep blue color. ...
305 views

### Create self-contained plots when Ticks or FrameTicks require external functions

Let's say I define tick marks for a plot in a separate function outside of the plot: ...
170 views

### Stopping Agglomerative clustering under a condition in Mathematica

How do I instruct Agglomerative clustering to stop/NOT merging two particular clusters if the distance between the two clusters is larger than a threshold value? I know that we can implement a custom ...
2k views

### What is the difference between a few simplification techniques?

I am trying to understand the difference between Refine, Simplify and FullSimplify, and when ...
2k views

### How to get graph layout that reflects edge weights?

My heart soared to discover that Mathematica 8 offers support for specifying a weighted adjacency matrix in WeightedAdjacencyGraph. But it seems that, regardless of the weights between edges, the ...
2k views

### Data fitting with Image processing feature detection

I have some 2D data that once plotted looks like the following ...
630 views

### Problem with Union and Intersection

Consider the following: list={{a,b,c},{c,d,e},{d,e,f},...{x_,y_,z_}}; I would like to apply Union on the elements of the list ...
172 views

### Joining only particular dates with DateListPlot

I have the following datasets: ...
519 views

### Reproducing nested loops using Map?

I keep producing bits of code like the following: ...
681 views

### Coloring edges in GraphPlot

I'm a little stuck with graph drawing part of my research — I can't use the Graph function for plotting my graphs, because my graph is a multi-graph. ...
2k views

### Append in For loop does not work

I need to break my for loop in case of an thrown message and append s to the result list. Breaking the loop works, but my result is empty. I can not use Table[] ...
978 views

### How to replace all occurrences of an element in a list?

Consider the following: list={1,2,2,2,3}; I would like to replace all 2 with the string "Test". ...
2k views

### How to create a list of pairs from 1d list(s)?

Say I've got two 1-dimensional lists A = {1,2,3} B = {a,b,c} How do I create a list of all pairs from list A such that the ...
1k views

### How to convert binary float to decimal float

I need to convert binary float to decimal float in Mathematica, ideally between any two bases. FromDigits["1.111111", 2] does not work.
4k views

### Legend of a plot: how to increase the size of the line/marker?

I'm using the following kind of code to do the legends of my plots: ...
738 views

### DeleteCases on list of Strings

Consider the following: data={"AB","CD","AF"}; Now I would like to delete all String from data which starts with "A". ...
256 views

### How to make an unremovable modal window?

Is there any way to securely stick a notebook window (e.g. a dialog) on screen that it cannot be closed/removed/hidden by any of the standard OS shortcuts, like AltF4 or AltTab under Windows? The ...
370 views

### Symmetric difference of a sample of lists

Consider the following: list1={a,b,c,d}; list2={c,d,e,f}; list3={g,d,c,h}; Now I would like to get the symmetric difference. Hence, the result must be ...
774 views

While answering this question, I tried TextRecognize to read single digits. But it doesn't recognize a single digit, even though the digits are clearly readable. ...
211 views

### Create a CDF file with a plot that cannot be edited by double-clicking

I have created a CDF file that contains a Manipulate object with a plot. I intend to embed the file in a web site, so that users can use interactive sliders to ...
604 views

### Efficiently deleting rows in many large text files

I have 500 text files each of about 200000 rows. I need to delete one row in each of them as fast as possible (later such operations will repeat). What is the best way to do this with Mathematica? ...
8k views

### Is there an open source implementation of Mathematica-the-language?

I've seen questions before such as "What is the best open-source equivalent for Mathematica?", but that specific question (and that line of inquiry in general) cares more about the computer algebra ...
1k views

### Is it possible to use Mathematica to record sound and/or vision?

I think the title says it all. I know about ImageCapture which seems to capture stills. Can ImageCapture be made to capture a ...
14k views

### Labeling individual curves in Mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal ...
391 views

### Custom distance metric for agglomerative clustering in Mathematica

Is it possible to have a custom distance metric defined to determine the distance between two clusters in Agglomerative clustering in Mathematica? I have a 3 dimension data with string values along ...
566 views

### Computing the distance between two curves obtained from image data?

I've got some image data that I've binarized. The image contains two curves, from which I'd like to compute the distance between (eventually computing an average radius for each point in the ...
203 views

### MatchQ and patterns for similar lists

I can't seem to find the right set of patterns to independently match two different lists. Simplified versions of the lists are as follows: ...
482 views

### Shading in squares crossed by a diagonal

You have a rectangle and it is diagonal. How many squares will be crossed by the diagonal (I guess assuming the side length of the rectangle are nice whole numbers) I've seen an implementation in ...