6
votes
1answer
300 views

How can I define a function that can accumulate its parameter?

For example, write a function add: add[3] return 3 add[4] return 7 add[10] return 17
6
votes
1answer
264 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. ...
6
votes
1answer
203 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 ...
6
votes
3answers
197 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?
6
votes
1answer
352 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
6
votes
2answers
132 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 ...
6
votes
1answer
137 views

Problem overloading D[] using UpValues

First I define an entry of UpValues overloading D[] for expressions with head ftest: ...
6
votes
2answers
213 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 ...
6
votes
2answers
185 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 ...
6
votes
3answers
352 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 ...
6
votes
1answer
143 views

How can I restore context menu functionality to a Manipulate that contains Locators?

Before adding a Locator to a Manipulate, I can easily print or export the result using a context menu: But after adding a ...
6
votes
2answers
259 views

A command for outputting a list of parameter values in a Manipulate interface

I am looking for a command that will output a list of values that correspond to the current parameter values manually set on a particular Manipulate interface. For ...
6
votes
3answers
181 views

How to scale the size of Pane to make it fit a Grid element?

I am wanting to make a Pane scale to fit (if Spacings are zero) a Grid element. ...
6
votes
2answers
487 views

Evaluate while external command is being run [duplicate]

Possible Duplicate: Computing Many Slow I/O Operations I'm launching an external command with the Mathematica front end that takes two arguments: ...
6
votes
1answer
253 views

How to compile Map and MapAt

I have a long list (say, million of elements, like this one: {{{1.0, 2.0}, 3}, {{4.0, 5.0}, 6},...} I would like to compile a function ...
6
votes
1answer
329 views

Solving antisymmetric tensorial equation

Assume we have the following Tensor objects: \begin{equation} F_{i}{}^{j}\;and\;S_{ij}{}^{k}, \end{equation} where the components of $F$ are known, and we would like to solve for the components of $S$ ...
6
votes
6answers
1k views

How do I fill in a circle made by ParametricPlot with one solid color?

I have a very simple question but I am new with Mathematica. I made a circle on a parametric plot and I made the line black. I want to make the inside of the circle on the parametric plot red. So the ...
6
votes
2answers
327 views

3D Plot: Number of Roots in x of a polynomial in x, a, b and c

I have a polynomial in four variables x,a,b and c. The number of roots of the polynomial in x depends of the choice of a, b and c. I would like to have a 3D-Plot with a, b and c on the axes, while the ...
6
votes
3answers
502 views

Changing background colour of a Manipulate element

Please consider the following: Manipulate[Plot[Sin[x (1 + a x)], {x, 0, 6}], {a, 0, 2}]; Now, I would like to change the background colour to yellow. I tried ...
6
votes
2answers
368 views

Monochrome PNG (and GIF) Export

Is there a way to Export expressions to a monochrome PNG? I have tried the ColorQuantize function which is mentioned in ...
6
votes
3answers
244 views

Is it possible to snip a certain number of pixels from a specified side of an image, without specifying the image's final width and height?

It seems that ImageCrop allows one to specify the final size of the image. For example, ImageCrop[image, size, spec] crops ...
6
votes
1answer
283 views

$\TeX$ conversion, support for \hphantom

I'm trying to write some $\TeX$ conversion for a tensor with an upper and a lower index, but I would like the lower index to be displaced to the right by the width of the upper index. In (La)TeX I ...
6
votes
1answer
242 views

How to save data using FileNameSetter or similar

I would like to export data to a file using a SaveAs type dialog, using something like FileNameSetter[name,"Save"] to give a browse button. Any help with this ...
6
votes
1answer
136 views

Property assignment on a graph vertex using PropertyValue does not work inside a function

I created this function: AddStone[board_Graph, v_, s : white | black | empty] := PropertyValue[{board, v}, VertexState] = s This function should change the ...
6
votes
1answer
663 views

CustomTicks and small ranges

UPDATE While the self-posted answer below (TickLabelStyle->TraditionalForm) works for most things, it also has the following effect: Integers are given periods ...
6
votes
2answers
653 views

How to set the NDSolve method to LSODA

I notice that off all the Method options available for NDSolve[...], LSODA is invoked quite ...
6
votes
2answers
198 views

Operate on several lists to create one list

How do you put corresponding values from different lists together according to some operation? E.g. I have three lists giving the velocity in the x, y and z direction respectively. I'd like create ...
6
votes
2answers
226 views

Truncate TreeForm to show only the top

For some expressions, TreeForm may grow very long. I'm only interested in the top levels of the expression. How can I get the tree form of only the first levels an ...
6
votes
3answers
298 views

How to eliminate the need to double evaluate a Manipulate so that a Module in its Initialization section works?

Using V 8.04 on windows. I think this issue might be related to the fact that Mathematica reads main body the Manipulate before evaluating or running the Initialization option. Or, might be ...
5
votes
1answer
83 views

Why PlotRange doesn't work for this set of values? [duplicate]

This code, doesn't show me data corresponding to x axis values 1000 and 10000 ...
5
votes
2answers
112 views

FullSimplify inconsistent

I'm having problems using FullSimplify to simplify a differential equation. The expression is simplifying just as I would like when I express a variable ...
5
votes
3answers
104 views

Explicit use of Evaluate not behaving the way I expect it to

I discovered a strange behavior of the Evaluate function. Case 1: ...
5
votes
1answer
507 views

How to make a resizable chess board?

For some reason I need to create a chess board. I can create a chess board by following command: ...
5
votes
1answer
136 views

How can I get this Graphics3D to rotate around a particular sphere?

I made this Graphics3D of the Sun with the plotted orbits of a few astronomical objects. ...
5
votes
2answers
617 views

Random walk on a sphere [closed]

I'm trying to programme a random walk on a sphere with Mathematica. I found this code while I was searching, but I'm not getting results from it. I waited an entire day, but my pc didn't finish ...
5
votes
2answers
125 views

How to customize derivative behavior via upvalues?

I'm having trouble getting customized derivatives (defined using upvalues) to behave in sane ways. By this I mean that I'd like to define a derivative using an upvalue and then have Mathematica apply ...
5
votes
2answers
329 views

Labelling objects in a picture with numbers

I need help processing a biology bacteria picture. I just started learning Mathematica and I hope you guys can use a simple method to help me solve the problem, please do not use super complicated ...
5
votes
3answers
329 views

Fast method for combining two lists

I have two lists, v1 and v2. Each element of the lists may be positive or negative. I want to create a list ...
5
votes
2answers
586 views

How to convert a string of number into real numbers without precision loss

I searched and did not find similar answers which can resolve the 'no precision loss' issue. A sample string is: ...
5
votes
0answers
101 views

How to keep $FrontEnd options from resetting?

I'm trying to get Mathematica to look in a different, version-tracked folder for the 'TextResources' files that it uses to build the Front End. I've prepended my version-tracked folder path to the ...
5
votes
3answers
194 views

Calculate integral for arbitrary parameter n in infinite square well problem

I'm continuing[1,2] the study of an infinite square well in the context of quantum mechanics. Ultimate goal is to calculate the product $\Delta x\Delta k$, for various eigenstates, that is for ...
5
votes
2answers
519 views

How to render a 3D ellipsoid with Graphics3D?

With Graphics3D[Sphere[{0,0,0},1]] I can render a uniform 3D sphere, but how can I render an ellipsoid? I would need to specify the rotation of the ellipsoid and ...
5
votes
1answer
185 views

Efficiently searching a list for the position of the closest number to a specified number

Searching by closest and position I wasn't able to find an answer—but found Nearest by guessing. Nearest, however, returns ...
5
votes
2answers
548 views

How to find the non-differentiable point(s) of a given continuous function?

For example, the non-differentiable point of the function $f(x)=|x|$ is at $x=0$. How to find the non-differentiable points of a continuous function that is defined numerically?
5
votes
1answer
170 views

Behavior of Graphics`Mesh`InPolygonQ 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: Graphics`Mesh`InPolygonQ[poly,pt] Displays ...
5
votes
4answers
248 views

How can I generate permutations of bit strings with repetition?

How can I write a function which has two parameters and it should generate combination of arbitrary range bits, for example: function[n, k], with ...
5
votes
3answers
325 views

Removing Abs from Abs[a + Exp[I*c]b]^2

Title says it all. Mathematica produces sometimes expressions of the form Abs[a + Exp[I*c]b]^2 where all three quantities a, b and c are positive real numbers. ...
5
votes
3answers
734 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 ...
5
votes
3answers
222 views

Drawing CountryData groups

I'm sure I'm overlooking something obvious, but I can't draw groups of countries. Here are two countries and two country groups: ...
5
votes
2answers
178 views

Passing list of options to Plot

I'm looking for a way to create a variable that I can use to hold all of the graphics directives for, say, a plot command. For example, I have 8 plots with variations on the following: ...

15 30 50 per page