# All Questions

1answer
354 views

### Define a function with the condition that it must be positive

I have a function f(x) and I want to define a new function g(x) that is equal to f(x) only ...
3answers
255 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 ...
1answer
457 views

### How to define a button inside Manipulate that tells Mathematica to re-evaluate the whole Manipulate code?

I have written a Manipulate code carrying out some very complicated tasks. There is no problem for the first run, but if I click the reset button to reset all ...
2answers
449 views

### How to exclude some points to make them more evenly distributed in a figure

If there are some points in a figure, how can I exclude some points to make them more evenly in the figure? 'Evenly' here can be defined as the number of points in each $0.01*0.01$ box is at most one. ...
4answers
499 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 ...
0answers
124 views

### How can I run MUnit tests outside of Workbench under Linux?

I would like to run MUnit tests from the command line. On Mac OS, I can do this: ...
2answers
127 views

### Pattern Matching with Indexed Object

If I have a list of rules associated with indexed variables like: solution = {a[1] -> 1, a[2] -> 10, a[3] -> 100} I would like to be able to extract all ...
2answers
457 views

### NDSolve: ProcessEquations and Reinitialize with Piecewise functions

I am having trouble with using NDSolve`Reinitialize when the system consists of a piecewise function. If we define the ODE system ...
3answers
354 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: ...
2answers
330 views

### How to add a graphics frame to an image without resampling

Using Inset to place an image inside a Graphics expression with Frame -> True provides a ...
2answers
208 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: ...
1answer
385 views

### Altering layout and sizing of Manipulate controls?

I'm currently working on a display project using Manipulate and was wondering if there is a straightforward way to alter the placement of the control options that I ...
1answer
483 views

### Graphics3D model of the human body and organs?

Does someone have a 3D model for a man (or woman) that can be displayed in Mathematica using Graphics3D? I have tried importing free .3DS models but they look ...
1answer
257 views

### VariationalD giving the wrong solution?

EDIT: As pointed out in the comments, VariationalD gives a variational derivative (which I don't want), not a derivative with respect to a function (i.e. ...
3answers
1k views

### Solve for the intersection point of 3 surfaces

Basically, I have three 2-torus (tilted) in 3-dimensional Euclidean space. They are expressed by parametric equations: ...
2answers
716 views

### WhenEvent in NDSolve

How come this doesn't work as I intended? ...
1answer
179 views

### Find the domain in which a sequence converges

I seem to have a lot of problems in the format of: Given the sequence $a_n=\frac{n^\alpha+1}{2n^8+5}$, for $\alpha > 0$, find the values of $\alpha$ such that the sequence converges. However, ...
2answers
223 views

### How to set PlotLegend Number Format

Is there any way to make Mathematica to show the legend labels like a real number rather than in fraction form? I read the BarLegend options, however they are just ...
1answer
832 views

### Controlling ColorFunctionScaling

Is there a way to control the scaling of ColorFunction beside just to turn it off and on with ColorFunctionScaling? Two ...
4answers
510 views

### How to transform Do loop to more efficient codes?

I'm new to Mathematica. Here is my original program: How to rewrite the Do part? ...
1answer
213 views

### How to find the name of the current function

I would like to know the name of the current function from within that function. For example, consider the following code ...
2answers
857 views

### Problem displaying eps exported histograms in Word 2010

I am having problems displaying histograms exported as .eps in Word 2010. I don't have problems though displaying them in a specialized .eps viewer. (Postsript viewer from Rampant logic) I am writing ...
2answers
357 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 ...
1answer
253 views

### BarChart FrameLabels with only partial Frame?

This test BarChart is generated by the code that follows it: ...
2answers
275 views

### Pattern matching repeated structures with named subexpression components

I am trying to write a function with a pattern that tests its arguments for a particular structure. But in that pattern I'd like to name a subpattern to make it easier to exract and operate on. The ...
3answers
456 views

### Efficiently extracting an array subset given a separate array

I have two arrays. The first array consists of tens of millions of rows and three columns with a string, a number, and a string. ...
2answers
339 views

### Concatenate strings from different levels of list

After a lot of trouble I've finally come pretty close to what I want to do. I now have a list that looks like this: ...
1answer
1k views

### How to correctly use DSolve when the force is an impulse (dirac delta) and initial conditions are not zero

DSolve (and NDSolve) return different and unexpected solution to differential equation when the input is an impulse. This is ...
4answers
2k views

### How to find the sum all even numbers of this sequence?

I have a sequence $(u_{n})$ $$u_1= 1, \quad u_2 = 2, \quad u_3 = 3, \quad u_{n}= -u_{n-3} + 3u _{n-2} +2 u_{n-1}, \quad \forall n \geqslant 4.$$ I want to list the first $20$ terms of this sequence ...
2answers
503 views

### What is ImageDistance measuring?

What quantity is ImageDistance measuring, and what do the numbers mean? I found the ImageDistance command in Mathematica 9, but ...
2answers
3k views

### How to access Mathematica license server (being outside of the local network)

This is no Mathematica-language specific question but rather a network problem, so if this is the wrong place to ask, I apologize. I am running Mathematica on Windows 7, the license manager ...
2answers
2k views

### In finding a logarithmic fit for some data (of the form a*Log[b*x]), WolframAlpha succeeds where Mathematica 7.0 fails, why?

I would like to fit a function of the form: $a \log(b x)$ to a set of data: ...
2answers
222 views

### Is it possible to define more than 9 shortcuts for notebook cell styles?

You can define shortcuts for notebook cell styles in the stylesheet editor, by adding MenuCommandKey->"7", etc. to the style definition. That is, you can define ...
1answer
255 views

### How to create a Hyperlink within the current Notebook?

Using “Create Hyperlink” dialog window I can create a link to a tagged cell in my notebook (it's “Destination notebook: Current notebook” radio button). Now, I can't figure it out how to create such ...
4answers
384 views

### Manipulate with explicit updates

I want to use Manipulate (I am open to other alternatives) to apply one of two different functions f or ...
2answers
152 views

### How do I mimic the functionality of “<>”?

The Cell expression for: <> is Cell[BoxData["<>"], "Input"] However similar expressions are parsed into ...
2answers
390 views

### Rectangle wave OK in calculations, wrong in Plot

I have a Piecewise function consisting of two rectangle waves with different duty cycles: ...
1answer
2k views

### FeynArts not working properly

So I have installed all FeynArts folders (from 3.5 to 3.7) with FeynCalc 8.0.1., and none of it is working properly :\ First I load the path to specific FeynArts package (3.5 for instance), then, by: ...
2answers
241 views

### Computers running Wolfram lightweight grid manager won't fall asleep

I have a computing environment comprised of: 27" iMac with dual cores running Mac OS X 10.6.8 and 2 XServes each with 2 quad cores running Max OS X Server 10.6.8 All networking by ethernet to a Time ...
0answers
134 views

### Calculating a limit with a result that is discontinuous in the parameters

The following limit is left unevaluated (Edit: added the assumption that $\epsilon$ is real thanks to the comment below): ...
1answer
183 views

### Why is SystemDialogInput failing to return a save file path?

I am encountering a problem using SystemDialogInput within a Button. The code below shows what I am doing. To test this create a ...
5answers
641 views

### How can I use nested conditionals inside my functions?

I'm a big fan of using conditionals inside my functions to deal with cases, that is, to pattern match in stages and possibly leave a function unevaluated. ...
3answers
1k views

### Solution for equation system with piece-wise defined functions

As I could swear this worked just yesterday, I am probably just doing something stupid here and I am sorry to bother you :) I am trying to find the point where a curve crosses a line. In this case, ...
2answers
186 views

### “Not a valid Filling specification” error

I have a function, which plots the given function array f. This is a part of the function: ...
1answer
253 views

### Can we know the background code associated with basic mathematica functions

I wanted to know how computers calculate basic functions like Sqrt so first I checked how humans do it I found that they use something called "Newton's method" that ...
1answer
1k views

### ListContourPlot-ColorFunction

How can I use ONLY the central 90% of the spectrum, not the whole range? For example, I do not like to see the lowest values in purple, but in deep blue color. ...
2answers
341 views

### Create self-contained plots when Ticks or FrameTicks require external functions

Let's say I define tick marks for a plot in a separate function outside of the plot: ...
4answers
586 views

### Shading in squares crossed by a diagonal

You have a rectangle and it is diagonal. How many squares will be crossed by the diagonal (I guess assuming the side length of the rectangle are nice whole numbers) I've seen an implementation in ...
2answers
352 views

### Manipulate Evaluation Order Problem

I seem to be getting some unintended results from a nested Manipulate that I have not been able to resolve. I boiled down the problem I'm having to a simplified ...
1answer
175 views

### Impossible to bypass evaluation on returned values?

Following all the great advice on this other question, I'm now fluent with HoldAllComplete and Unevaluated on the input side of ...

15 30 50 per page