# All Questions

3k views

### How to remove redundant {} from a nested list of lists?

There are numerous examples here, whose end result is the removal of empty brackets {} and empty lists. I still can't find an example of simply removing redundant ...
153 views

### How to change the last plotstyle of a list

I'm using ListLinePlot to plot a list containing 10 lists, using the default colors: ListLinePlot[myList] I would like to be able to keep the default PlotStyle ...
169 views

### Separate an array in two arrays, the even and odd terms being separated in these two arrays

How can I separate the odd terms in one array and the even terms in another array,i.e., go from a={1,2,3,4} to aeven={2,4} ...
227 views

### How can I draw this plot?

How can I draw a plot like this one? I want to be able to specify the x-axis, y-axis, and z-axis ticks and the number of bars in the plot.
165 views

### Converting to InputForm or StandardForm without deleting comments

Following on from this question: Is it possible to convert an expression to InputForm or StandardForm without losing the comments? For example, ...
1k views

### How can I make a transparent 3D Rectangle?

Sorry, I didn't mentioned clearly in my earlier post. I want to build a transparent Rectangle, within which I want to diffuse a certain color of my choice which is ...
127 views

### Mathematica 9.0 problem: ParallelTable with SQLExecute

I have run into the following problem: when I try to run the following code in Mathematica 9 I get SQL connection error on all kernels. The code is: ...
104 views

### Better alternatives for the Sound function?

The Sound function represents the sound signal very primitive in my opinion. There are only two buttons (play and pause). No rewind, no playing from some point on (like the most sound players have). ...
267 views

### Proper use of arbitrary number of variables

So, I'm working on a project where the number of independent variables is not fixed. Consider a problem of $N$ independent variables, $\boldsymbol{r}$. I want to perform different things with them. ...
164 views

### Subtract more than one array using DeleteCases

I need to create an array subtracting two arrays from another array. I know how to subtract one: am = DeleteCases[amp, Alternatives @@ af] I can subtract an ...
71 views

### How to get a number, but not a list, of the dimension of your array?

I need to use the dimension of a certain array, to use it as a bounder in a loop afterwards. The problem is that I get a list, when write : ...
252 views

### Non-regular grid data

I have issue with non-regulary spaced data. I have set of 3 numbers {x, y, z} in my list. ...
148 views

### How can I write image to MySQL database?

I have a database, such as: In Mathematica, the final code is: img1=Export["/home/user/Desktop/1.jpg",resultimg1]; I tried ...
187 views

### Updating the format style of input cells from an older/'pre-styled' notebook

I have been given a large notebook that was created in mathematica 6. It contains a structure of sections and subsections and the input text is formatted in an unusual (possibly just old) style (see ...
495 views

### Executing a .m file from the Linux command line

I have some code in a file named Demo-3.m, It can be evaluated in Mathematica 9. The final expression in the file is ...
84 views

### NIntegrate, view integration options [duplicate]

The Mathematica manual says: NIntegrate symbolically analyzes its input to transform oscillatory and other integrands, subdivide piecewise functions, and select ...
148 views

### Changing Curl to use Colatitude [closed]

How do you change Curl in Mathematica so that it uses theta as latitude rather than as colatittude? Changing theta to ...
239 views

### Histogram3D using sums instead of counts

I'm trying to create a 3d histogram/ matrix plot pair. My data is in the form {{TTR1,TBF1},{TTR2,TBF2},....} What I would like is to modify the Histogram3D so ...
266 views

### Plotting many tables in a single plot

I have several lists. ...
414 views

### Color plot markers using If statement

I am calculating eigenvlaues. Some are negative, some are positive. I define the index nn and mm (as well as np and mp) of each matrix element by some functions that assign positive, zero and negative ...
824 views

### Loop through a list and select elements

I am new to Mathematica and I have no idea how to make a basic for loop work. I want to loop through the elements of a list: Range[45, 200]. I want to select the ...
191 views

### How to make a plot of function over 24 orders of magnitude?

Assume these parameter definitions first: ...
190 views

### Listing over multiple inputs (tensor rank > 1) in a compiled function

I'm trying to optimize the solution given by Michael E2 to my previous problem (Efficiently determining if 3D points are within a surface composed of polygons) which I figured would be relatively ...
589 views

### How to dynamically toggle curves on/off in a crowded Plot?

When multiple curves appear in a single plot, it is useful to interactively turn certain curves on or off to visually compare smaller numbers of curves. It is trivial to put a quick dynamic together, ...
484 views

### Include a CDF file in sites.google

I have a website on sites.google and I also have blog on wordpress. I would like to include some CDF files on them. How can it be done?
162 views

### The same value of VertexSize for vertices in different graphs causes different vertices size

I generated some graphs. The smallest vertices in the 1st graph should be the same size as the smallest vertices in the second graph. The smallest vertices have the same size (...
656 views

### Properly Force Mathematica to Simplify Log Expressions/Rules

I want to be able to expand $\log(x^n e^x) = n \log(x) +x$: FullSimplify[Log[x^n Exp[x]], x > 0 && Element[n, Integers] && n > 1] yields ...
2k views

### Efficiently determining if 3D points are within a surface composed of polygons

This is the 2nd part of a previous question which I edited to make into 2 separate questions: Extracting polygons from 3D contour plot surface As an extension of my earlier question involving simple ...
5k views

### How to plot an ellipse?

I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using Plot[(x/5)^2 + (y/3)^2 == 1, {x, -5, 5}, {y, -3, 3}] but I'm getting ...
358 views

### Quiet doesn't work with FindRoot when using Brent method

The following has no solution: FindRoot[x == 1, {x, 0.25, 0, 0.5}] And Mathematica correctly warns us: FindRoot::reged: The point {0.5} is at the edge of the ...
121 views

### How to accelerate updating some parts of sparse matrices?

I am trying to update some parts of an specific matrix as rapidly as possible. In what follows, I first set up the basics things that I want to use ...
185 views

### How to make DynamicModule work without an extra ENTER

I've been trying to learn more about DynamicModule (I do not use them, as I used Manipulate all the time). After some time ...
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 ...
260 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: ...
506 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 ...
225 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 ...
217 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) ...
179 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 ...
558 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 ...
695 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 ...
47 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, ...
113 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 ...
29 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 ...
202 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 ...
846 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?
721 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 ...
368 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 ...
192 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 ...