# All Questions

1k views

### Generating a broken or snipped axis in ListPlot

I have two data sets, data1 and data2. For example: ...
273 views

### How do you properly create Buttons to change dynamic variables using Table

In this example, I want a series of four buttons to change the value of a variable that is used dynamically to drive a plot. I am trying to figure out why using Table around the buttons causes a ...
195 views

### Inequality of reciprocal functions

Simplify[1/(1/a + 1/b)] { (a b)/(a + b) } That doesn't look right. The given function has an infinite term for a = 0 and one ...
887 views

### Why modules with no variables?

I was reading some code, in particular, recipe 4.13 on unification pattern-matching in Sal Mangano's Mathematica Cookbook, and there were many instances of Modules with no variables in them, such as ...
556 views

### Automatically load packages at startup

I'm a physics student and I try to simplify my day with Mathematica. Every time I use Mathematica I need Div[], Grad[], ...
623 views

### Prepend Information to Warning Messages

I have a function running within a Do loop that sometimes issues a warning. I'd like to prepend the warning with the loop ctr so that I can go back and debug that instance later. Basically, I would ...
126 views

### Using Dynamic with UpdateInterval and EventHandler Together

I've been having some difficulty with the aforementioned use of these three functions/options and would greatly appreciate some help. I know that they're is probably an easy way of making a disk move ...
225 views

### SplineDegree->1 does not work with BezierFunction?

This works (SplineDegree -> 2) ...
663 views

### Proper way to Plot a single function in two different styles?

I've got this code ...
313 views

### Importing array with complex numbers

This is probably an easy question: I am exporting the results from a longer calculation into a dat-File, then I set the cell to non-evaluatable and put an Import in front, so I can later work with the ...
148 views

### Reasoning about Degree of Polynomial

Apologies if this is outside of the realm of Mathematica -- I'm still trying to figure out the limits of how expressive Mathematica is (and how much of my work can be automated). Suppose I define the ...
260 views

### How can I highlight one function in the Plot of a list?

I've got a Plot of a list of functions from this previous question of mine. ...
500 views

### Simplifying the derivative of $|x|$

Context In[855]:= D[Abs[x], x] /. x -> 1 Out[855]= Derivative[1][Abs][1] In[856]:= D[x, x] /. x -> 1 Out[856]= 1 Question Why is ...
134 views

Code ...
460 views

### How can I get Mathematica to simplify $\Vert\{1,\sin(t),\cos(t)\}\Vert_2$ to $\sqrt{2}$?

Context Norm[{1, Sin[t], Cos[t]}] Norm[{1, Sin[t], Cos[t]}] // Simplify (* Sqrt[1 + Abs[Cos[t]]^2 + Abs[Sin[t]]^2] Sqrt[1 + Abs[Cos[t]]^2 + Abs[Sin[t]]^2] *) ...
708 views

### Big-Oh Notation

Is there a way to have Mathematica understand Big-Oh notation? For example, I want something like: MinBigOh[...] where ...
311 views

### How to create FORTRAN Cell?

I want to create a FORTRAN cell in Mathematica. ...
157 views

### Manipulating spacing in a text object

I want to visually illustrate substitution in a mathematical expression. This is an example: ...
227 views

### How to remove scroll bars from embedded cdf?

I am using the deploy command to embed a CDF file in an HTML page. I am using the annoying but currently necessary fullscreen:'true' trick to reveal the "Enable ...
1k views

### How to select minimal subsets?

I am a newbie, so please point me in the right direction if you feel this question has been answered somewhere else before. Here goes: Suppose I have a list like this: ...
767 views

### Mathematica gives wrong answer for integral

When I execute the following, Integrate[Exp[-w^2 + I w^3], {w, -\[Infinity], \[Infinity]}] I get ...
1k views

### How do I use Map for a function with two arguments?

I'm a newbie who tries to be a good boy, and use Map instead of writing out a list of functions. I have a table I want to Map ...
419 views

### How Can I plot 3D figures using discrete data in one dimension?

I have an approximate solution for the function u[x,t] using the semi-discretization method in time step. For example, I have ...
329 views

### How can I separate a separable function

I have a separable function $f[x,y]$, and I would like to find two functions $g[x]$ and $h[y]$ with $f[x,y]=g[x] h[y]$ where $g[x]$ doesn't depend on $y$ and $h[y]$ doesn't depend on $x$. Ideally, ...
308 views

### Making a plotted curve interactive

Is it possible to make a plotted curve interactive in the sense that when hovering over it a line is drawn from the "hovered" point to one (or both) of the axes. I did do my homework, I just can't ...
574 views

### One-dimensional heatmap

I want to plot a heatmap of a set of real points of the interval [0,1] - i.e., to display their linear density in the sense of a smoothed histogram. The idea I have come up so far is to use the ...
238 views

### How can I deploy only the output in Player Pro

I want to know how can I see only the output when I deploy the Mathematica notebook in Player Pro as in ...
107 views

### Colors in ExclusionsStyle

I have the following Plot: Apparently MMA uses ColorData[1,1] for the edges in all graphs. I already tried adding ...
191 views

### How To Track the Cursor Position?

I have 2 InputFields and 2 Buttons. I would like that when the user clicks the Pi Button or ...
313 views

### Mathematica package manager

I want to bundle up a Mathematica package that I've written and distribute it as open source. It has a couple of dependencies that I'd like to automatically download independently from my package as ...
187 views

### Internal Representation of ?name and ??name

Code FullForm[Hold[?name]] Syntax::bktmcp: Expression "Hold[?name]]" has no closing "]". Syntax::sntxi: Incomplete expression; more input is needed . Question ...
844 views

### Why does Mathematica use [[ ]] notation for array indexing?

I am confused by why Mathematica uses [[3]] to get the 3rd element, or [[i,j] to get the i,j-th element of a 2D array. This ...
239 views

### Color ramp banding in PDFKit when exporting Raster image Inset to PDF

Here I produce a Raster image with large uniformly colored rectangles and put it in an Inset: ...
113 views

### How do I prevent this precision exception?

I have the following as the first step to a sequence. x = 2 - GoldenRatio; Ceiling[x + x^(1/2)] It gets a precision exception. The value is correct, but I would ...
279 views

### Building a tree

Given a list of word characters, such as this one, I'd like to build a tree, similar to this makeTree function, but with the tree in a different format. So, for an input such as ...
416 views

### How to monitor the progress of Map?

I have a function doSomethingComplicated[...] that takes about 10s on average to evaluate. My list, listOfArgs has about 10000 ...
107 views

### DateList not using current year when a year is not specified

According to the documentation when using DateList but not giving it a year it should use the current year. It is not doing that for me. Instead it uses 1900. ...
817 views

### Converting numbers to integers

I've read the available documentation but I still haven't found an NumberForm -> Integer function yet. No result in this site's search, either. Does it exist? ...
280 views

### Combining and aligning “chart” type graphics with regular plots

Is there an easy (recommended) way to align regular plots (e.g. ListPlot or Plot) with chart type graphics (...
696 views

### Is there a way to output histogram x and y data without using the Histogram chart function?

I have a large list of data (3.2 million real numbers), and I would like to plot a histogram of it. The built-in Histogram function is very nice, but on my ...
216 views

### Inequality with assumptions not simplifying

Can someone explain to me why the following does not simplify to True (as all constituents are positive)? ...
131 views

### Can't run 2 CDF documents at a time on a Windows computer

I've rolled out a few CDF's to end users. See earlier posts: suppress message and which player platform. Now, an end user reports that they can't open more than one CDF document at a time. The ...
105 views

### Obtaining EditDistance[] from a List of Strings

Consider the following question. I have a long selection of files (some 5,000), arranged linearly, and I want to view to what degree the files have changed between each other. For a small example, ...
420 views

### Finding the characteristic polynomial of a matrix modulus n

Given a square matrix, is it possible to calculate its characteristic polynomial modulo n? Unfortunately, this function ...
159 views

### DateList's aggressive interpretation of TimeML duration codes

DateList "aggressively" interprets strings, such as "p72h": DateList["p72h"] gives ...
652 views

### PolarPlot render oddities

I apologize if this is a obvious question and answer, I don't often use Mathematica to display plots or graphics in general to be honest. So, I was tutoring my cousin yesterday in relation to Polar ...
2k views

### How to do System dynamics simulations / diagrams in Mathematica?

System dynamics is an approach to understanding the behaviour of complex systems over time. It deals with internal feedback loops and time delays that affect the behaviour of the entire system. What ...
204 views

I have a piece of code I keep using in new notebooks over and over again and I have to copy and paste it in each new notebook. Problem arises: if I update the code in one file I have to manually do ...