# All Questions

2k views

### Distance between point and line segments

How would you determine the shortest distance between a point and one or more segments? For example, what is the shortest distance between the point and the two segments below? Clearly the point is ...
400 views

### What is wrong with my VectorPlot?

I am trying to make a simple plot of a spherical field falling off with distance from origin: ...
709 views

### Controlling Bar Color in BarChart precisely [duplicate]

I'm trying to control the color of individual bars in a BarChartwhen I pass a 2 dimensional list of data to plot. What I want to accomplish is that for each pair of ...
249 views

### How to deal with units in logarithms?

I'm trying to take a formula, take it's integral which yields a formula with logarithms, and then directly plug in values with units and get an answer. However if the units go into any of the ...
292 views

### Why does the syntax highlighter color a local symbol red inside DynamicModule?

I am adding a Module inside DynamicModule here is an example (thanks to @rm-rf for this simple example) ...
197 views

### WolframAlpha Selective SubPod Content

I am sending queries to Wolfram | Alpha from Mathematica V9 and and importing the results back into Mathematica, but I am running into a challenge in formatting the request. Specifically, I would like ...
886 views

### Plotting 2D Data with Categorical Data in One of the Dimensions

I have a 2D data set in the form of: data={{Category, Integer}, {Category, Integer},{Category, Integer}...} It is a pretty simple data set with four categories ...
806 views

### Efficient Generation of Random Variates from a Copula Distribution

I have a 7-asset portfolio for which I want to simulate daily log-deltas using a Student T copula. The marginal distributions are all either Stable or TsallisQGaussian. Using NMaximize, I have ...
48 views

### how to interactively select points inside certain region in a plot [duplicate]

Very often I encounter a situation that I want to select some points inside certain areas of a plot. For example, ...
124 views

### How to use SaveDefinitions when using Rasterized Frames for a ListAnimate?

In another post (Is it possible to prerender animation in Wolfram Mathematica?) I got a good way to prerender frames in order to get a smooth animation using ListAnimate. I need to save the Animation ...
32 views

### Define a second name for a function [duplicate]

I'm working with an own package of functions. During development I noticed, that my naming scheme is not that clever; for example some of my functions are starting with capital letters. But I have ...
207 views

### Print out all functions in Mathematica

Sometimes I only remember parts of a function name and I want find that function name quickly, and if I search in the document center, it will give too much informations related to that and difficult ...
933 views

### How do I get my equation to have the form $(x-a)^2 + (y-b)^2 + (z-c)^2-d = 0$?

I want Mathematica to express the equation $$-11 - 2 x + x^2 - 4 y + y^2 - 6 z + z^2=0$$ in the form $$(x - 1)^2 + (y - 2)^2 + (z - 3)^2 - 25=0$$ How do I tell Mathematica to do that?
1k views

### How do I make function A create and return function B?

My basic need is I have to take lots of data and other information and assemble it into a function (static parameters). I then need to call the function many times for numerical results for many ...
531 views

### How to combine some elements of a list?

In order to simplify my expression, I face a list manipulation problem. For example, given the input list ...
204 views

### My Data has negative and positive numbers, can I still use it to get the PDF?

I have data that reflects the arrival time of a flight. {3, -2, 16, 13, -6, 5, 4, -7, 7, 0……..n} this is for 8:45am and has 150 elements "arrivals" The positive values represent the time in minutes ...
235 views

### Is there a way to track the Simplify process?

Is there any way to track how Mathematica actually performs Simplify, so that we can see what those "Automatic" transformation functions it applies are and how it ...
158 views

### Retrieving the text of a message

Is there a simple, built-in way to retrieve the text of a message, given it's identifier (such as Power::infy)? The documentation describes how ...
235 views

### Problems with doing calculus on Interpolating functions

The following is my code: ...
4k views

### Plot 4D data with color as 4th dimension

I have a list of 4D data (x position, y position, amplitude, wavelength). I want to plot x, y, and amplitude on a 3D plot and have the color of the points correspond to the wavelength. I have seen ...
152 views

### How to calculate only four elements per column in a block matrix?

I have a matrix generated like this : Table[Sequence @@ {f[t[[i]], j, x], g[t[[i]], j, x]}, {i, 16}, {j, 3}] where $f$ and $g$ are two different functions, $t$ ...
276 views

### Optimizing the performance of an algorithm

First - a bit of an introduction. If you're only interested in the code, you can skip this section. The following question is drawn from Dennis E. Shasha's Puzzling Adventures, and is listed under ...
520 views

### Intermediate variables in NDSolve

I'm interested in using NDSolve as an integrator for a system of differential equations that looks like the following: ...
2k views

### How to add a common color legend to a grid of density plots?

I have a grid of density plots, say something like: GraphicsGrid[Partition[Table[ DensityPlot[Sin[i x] Sin[y/i], {x, -4, 4}, {y, -3, 3}], {i, 1, 4}], 2]] I ...
1k views

### Polar Plot of a two variable function

I am trying to make a polar plot of a two variable function, which has a radial and an angular part. For instance Y[r,φ]=r^2 Cos[φ]. I can make this plot using ...
169 views

### Choosing a solution to plot

I'm solving a system of equations that gives me three solutions and then plot a series of solutions depending on a parameter. The problem is that I have to choose different solutions depending on ...
732 views

### Subdividing a polygon , equivalent fractions

I see that I was a real "doofus" here and my original question was flawed. You can't divide a polygon like you can a circle or a rectangle, except in special cases... I should have seen that right ...
2k views

### Simplify matrix algebra

I'm trying to simplify some matrix linear algebra, for example, simplify $$\big(a1\times(A1\cdot A2)\big)\cdot\Big(a2\times A3\cdot A4+(a3\times A5)\cdot(a4\times A6)\Big)^{T}$$ where lower case ...
573 views

### Selecting subsets of a list containing a specific element

I'm trying to generate all the subsets of a set containing a specific element. For example, for the set {1, 2, 3, 4}, with the specific element I want inside each subset being 4, the required answer ...
538 views

### Finding all/most roots of a discontinuous function more consistently?

I have the equation: f[x_]:=α Tan[α*a] - Sqrt[c - α^2] and ideally I want to find all of its positive zeros, given a and c, with variable alpha. The problem is ...
372 views

I am trying to create a button that uses SystemDialogInput["FileOpen"] to browse for a file and assigns the file name to a variable. For example: ...
87 views

### How do I get output size to stick? [duplicate]

I have increased size of text to something I can read comfortable. When I delete output and evaluate notebook again with any changes made, the output text size returns to eyestrain inducing size.
126 views

### LogLinearPlot, extact data to a file, part 2

My question is based on the discussion that I started: Plot, extract data to a file The method proposed works well for the Plot command, but what about ...
190 views

### How to stop Manipulate changing view point

When using the following manipulate I can rotate the plot and manipulate the value without my view point changing; ...
140 views

### Convert a list with three arguments {x0,x1, step} into an equidistant table?

How can I convert a list such as: a = {1, 2, 0.1} into sequence so that I can pass them into a function, e.g. I want to be able to do something like this ...
1k views

My school uses mathematica 8 on several of their computers. I would like to download a trail version for my home computer. I would like the same version. Is there a place I can download mathematica ...
227 views

### Improving ContourPlot and Table output

I am trying to examine the results of and NDSolve solution for a BVP, and the output is not at all "pretty". Here's the code: ...
503 views

### Multiply a list of matrices by a list of vectors

How does one multiply a list of matrices by a list of vectors, elementwise? For example, multiplying ...
2k views

### Angular Range in Polar Plot

I am trying to make a polar plot using the following code ...
226 views

### Can one affect the appearance of components of a control?

I'd like to control the appearance of the components of a TabView[] control. Such a control appears constructed of Buttons, ...
172 views

### Using DeleteCases and Map together

Given: list1 = {{"a",1},{"b",2},{"c",3}} I would like to delete any pair in list1 that does not have a first element that belongs to list2. Example 1: If ...
1k views

### How to calculate partial derivative of an unknown function

How can I force Mathematica to calculate symbolically the partial derivative of a function u[x,y] with respect to a variable ...
576 views

### Problem with ContourPlot3D

The following line works fine: ...
171 views

### Sequence and boolean And

I'm trying to figure out if a calculation result it's a valid result. As it return a matrix, I need to test that every element it's a number, so I thought this could work... ...
371 views

### How Simplify and Assume can be combined on matrix products?

What I am trying to do is to simplify some expressions involving matrices! The problem is that Simplify[] considers the simplifications based on alphabetical order and everything is Commutative. For ...
168 views

### How to get VertexDelete to work?

I'm using Mathematica 9 and want to delete a single vertex and all associated edges on a graph but can't seem to get the function VertexDelete function to work. My code is below. I declare a graph ...
127 views

...
2k views

### Tensor analysis

Has anybody used tensors in Mathematica? How to properly work with them? I find Mathematica not very friendly in this field, as I am defining my own functions for lowering & raising indices, ...