# All Questions

405 views

### How to Gather a list with some elements considered unique

I have a list of the form: list={{0,...},{1,...},{1,...},{0,...},{3,...},{3,...},{0,...},{0,...},{5,...},{5,...},{5,...},{0,...},{5,...},{0,...},...} So when we ...
248 views

### How to wrap this dynamic code inside a Manipulate?

My goal is to set up a Ising-type simulation, where many fast simulation steps are done in the background, and a visualization of the current state is displayed as the simulation evolves, being ...
173 views

My code: ...
648 views

### How to rotate TickMarks in DateListPlot?

Is there a way to rotate TickMarks in DateListPlot to avoid overlap, eg: Part of the code used to generate this is: ...
551 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 ...
596 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 ...
2k views

### Inverse of a complicated function

Mathematica is struggling to find the inverse of this function f(r): ...
1k views

### how to simplify symbolic integration

The following is the code: ...
731 views

### How to find the smallest root

I have a continuous, differentiable, monotonic, bounded function called F[t]. If t -> Infinity then ...
568 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? ...
1k views

### Force function to make assumptions about its input variables in Mathematica

I'm trying to force a Mathematica function to make an assumption about its input variables. In my case, I'm trying to define a function to return the pdf of a Gaussian. But let's use a simple toy ...
144 views

### Organizing similar datasets using Contexts or otherwise

I often import several long time series to analyze something about a city. When I have multiple cities, I use contexts. As a simple example, ...
639 views

### Efficient image Import

I have several sets of 20 images I need to import. Each time they have different categories. "Name"<>"Cat"<>"No" Electric B 1 for example. I need to create lists that contain the images ...
844 views

### How do you get high resolution plots in applications using the Mathematica MathService?

This is for Mac users only using MathService (MathService it seems, given that it was created back in 2004, is a power pc code and requires Rosetta to run on Intel). If I type a plot command in ...
104 views

### Can't plot rotated region

I was experimenting with the code from this question when I ran into another problem with regions. ...
261 views

### How to color edges of a graph which has multiple edges connecting certain vertices

I'm studying BIBD(Balanced Incomplete Block Design) and want to draw some graphs by coloring their blocks in different colors, respectively. A block is a collection of edges (or vertices). For ...
347 views

### Find the eigenvector associated with the smallest eigenvalue, not smallest in magnitude

I am trying to find the eigenvector of a $20000 \times 20000$ sparse matrix associated with the smallest eigenvalue. I realized that the smallest eigenvalue might be negative; for example, if the ...
94 views

### How to understand shared passing of a MTensor in LibraryLink?

According to the documentation, there are four different type of memory managing when passing a MTensor with LibraryLink: Automatic, "Constant", "Manual" and "Shared". The Automatic and "Manual" is ...
461 views

### How to randomly erode a 3D distribution of points with Mma 7.0?

Suppose we have a 3D distribution of points, like the spherical ball example below : ...
75 views

Is it possible to find a function if first few terms of the expansion is known. For example if I have this series $f(x)=\frac{k^3 x^2}{6}-\frac{k^5 x^4}{120}+\frac{k^7 x^6}{5040}-\frac{k^9 ... 1answer 293 views ### Having trouble fitting data using NonlinearModelFit I'm trying to fit data = {{2002, 45000}, {2004, 90000}, {2005, 120000}, {2013, 211000}}; to an exponential function ... 9answers 518 views ### combining and comparing lists I have 2 lists (of lists), where most of the contained lists match. That is, the lists contained in list1 mostly match the lists contained in list2. In this simplified example each of the inner ... 4answers 632 views ### Removing empty sets from lists If I had a list, say, names= {"Andy", "Bob", "Carly", "Sandy", "Jeff", "Tim", "Tom", "Zach"} and I decide to pick a characteristic only a certain of them have, ... 1answer 154 views ### The third argument of the Root function Consider the roots of an arbitrary indecomposable polynomial: sol = Solve[x^5 + 2 x + 1 == 0, x] The returned expression is ... 1answer 376 views ### Getting clearer StreamPlot output When I do a StreamPlotof a rather complicated pair of differential equations, it loses some details. For example: ... 1answer 180 views ### Behavior of GraphicsMeshInPolygonQ with self-intersecting polygons Playing around with some of the answers in the question How to check if a 2D point is in a polygon? I noticed that: GraphicsMeshInPolygonQ[poly,pt] Displays ... 3answers 127 views ### How to simplify my expression to the style of “a+b*I”? How to simplify my expression to the style of "a+b*I"? Expand[(E^(I θ) (-1 + E^(I n θ)))/(-1 + E^(I θ))] ... 4answers 145 views ### Hold expression with RandomInteger One more question for today: I'm trying to show two random integers with a plus (+) sign between them, in an unevaluated form. I know how Hold and HoldForm work, but they hold everything, including ... 3answers 792 views ### Circular Plot and Circular Histogram The spherical or circular data arises when we measure data in degree e.g wind direction, clock and compass etc. Then representation of such data we need to plot circular plot, circular histogram and ... 3answers 489 views ### Expression of uncertainty in measurement. I have a problem with writing a Mathematica function. I have been requested to show the results of my experiments with the measurement uncertainty (mu) like below: ... 1answer 229 views ### String pattern search and replacement — it works, but produces error messages only the first time it is called I defined a function in Mathematica to process a pre-generated string. More specifically, I'd like to process some parts of C codes generated from MMA. Basically what my function does is to expand the ... 2answers 1k views ### How do you put conditions on indices in a sum? I'm relatively inexperienced with mathematica, so I apologize if this is a trivial question. I want to take a double sum over a function$f(i,j)$of two indices, of the form$$\sum_{i = ... 3answers 177 views ### Is it possible to Import urls not type “” These days I often copy urls from Internet Explorer's address bar. When I paste the url into a Mathematica cell it is neither a string nor a expression. ... 2answers 627 views ### Manipulating plot of random iterated function system fractal I'm generating the Sierpinski Gasket by implementing a chaos game in mathematica. What I'd like to do is create an interactive manipulation with a slider, whereby moving it forward, plots all the ... 1answer 165 views ### Importing images from the web using ImportString & URLFetch I can bring images from the web using the Import command like this: Import["http://blog.wolfram.com/wp-content/uploads/2008/06/se-30.jpg"] Sometimes the web ... 4answers 635 views ### data visualization on a lattice grid Is it possible to visualize an array whose elements are angles as actual angles on a lattice grid? E.g., say, if the input is: ... 2answers 290 views ### How can I find if the number of subsets for a list is very large? I'm trying to find the following; Subsets[Range[2, 2300], {4}] but my computer gave the following error: ... 1answer 120 views ### Using enum values with J/Link How can I pass enum values to a function when using J/Link? What is the correct syntax for typing an enum value? For example, call normalize() using ... 6answers 903 views ### Image of first quadrant under$f(z)=(z+i)/(z-i)\$

I'm able to plot the region where Im[z] > 0 and Re[z] > 0: ...
427 views

### How do I display an expression with negative powers?

How do I display an expression with negative powers? Mathematica seems to always invert a term with a negative rational power. None of the following work: ...
301 views

276 views

### PlotStyle does not work when plotting a non-evaluated list of functions [duplicate]

When a list of functions is passed to Plot in an unevaluated form (e.g. with Through), the result is a plot with single color. ...
206 views

### Under what conditions does FinancialData return a ::notent message?

I tried retrieving FinancialData for a few companies but when I tried doing it for NTDOY, I couldn't. As of 25/12/2012, querying ...
198 views

### How to rename a built-in function?

I want a built-in function renamed without loss of any properties, I want the shorter name to appear in all results and to be recognized as input. Is it possible?
361 views

### BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
133 views

### Prevent front-end from reformatting long fractions while editing

I am editing an expression containing wide fractions (typeset with fraction boxes): But if, while editing the equation, the fraction exceeds some threshold (seems to be approximately the window ...
139 views

221 views

### How do I Export through a standard system file save dialog activated by a Button?

As near as I can tell, Export cannot be configured through arguments or options, to present a standard system file save dialog to the user, so that he can specify a ...
188 views

### Can Tuples help simplify this?

I have a list {1, 2, 3, 4} and wish to form {{{1,2},{3,4}}, {{1,3},{2,4}}, {{1,4},{2,3}}} I ended up doing it manually ...
357 views

### How can I stop the blinking when rotating a Graphics3D? [closed]

I wrote a function interactiveDesign that returns different Graphics3D items in a list. Then I call the function ...

15 30 50 per page