# All Questions

392 views

### Don't understand why Mathematica is complaining about my Graph expression; how can I fix it?

The Tube in Arrow problem is fixed in version 10. Note that in version 10 Graph3D must be ...
229 views

### Fluid mechanics problem concerning flow over a wedge

Below is the code I am using to generate a velocity profile and temperature profile for flow over a wedge. ...
61 views

### How to select a set of cells to cut and paste into another notebook [closed]

I'd like to cut and paste from one Demonstration notebook to another. These notebooks have a few sections where the content is separated into disjoint cells (examples: Details, Related Links, Search ...
136 views

### Scaling the time axis of an interpolated function (as in a solution from NDSolve)

I'm wondering how I can change the units of the x (time) axis when plotting a solution from NDSolve. I have obtained three solutions to a system of differential equations, all of which exist over the ...
70 views

### How to obtain all the partitions in a set $A$ such that the union of these partitions equals $A$?

I'm trying to make a visual proof on the irrationality of $\sqrt{2}$. At the moment, I've created a figure to show that $b^2$ elements always constitute a square: And I want to show that it's not ...
114 views

### Bar Chart: How to adjust the font size for the bar labels as the chart size is manipulated

I have data that represents the binding energy of oxygen on different surfaces. Each bar is a different transition metal, and the length of the bar is the binding energy of oxygen. How do I make the ...
97 views

### Computing symbolic norm of a vector

Consider the code: n1 := Cos[α] Sin[β] n2 := Sin[α] Sin[β] n3 := Cos[β] n := {n1, n2, n3} Norm[n] Why the result is ...
114 views

Is there a better way to write this gather? I have a list of particles, "particlelist", and a list of particle coordinates, "coordlist" and I want to put all the particles into a 3-dimensional ng x ...
95 views

### CDF embedded in web page and Windows desktop magnification

I am running Windows 8.1 on a ThinkPad T540P with a 3K screen, which is equivalent to Apple Retina screens. I have configured Windows to increase the magnification of the desktop to make fonts ...
493 views

### Union::normal: Nonatomic expression expected when using Uncompress

I saved a expresion to a file like this Export["file.dat",Compress@myExpression]; Then (i don't know why) when I import the file i get the compressed expresion ...
660 views

### How to fix this memory leak

I am using halirutan's code in this thread to unflatten a list. It works very well but the problem is that the Module's local function f is not deleted when the ...
124 views

### How to set the position of the palette when use CreatePalette[]

When using CreatePalette[], the palette created always shows up on the upper left corner. Is there a way to make it show up at the center of the screen, just like ...
61 views

### Printing the base 'b' value of an integer as a string (without the subscript base indication)

Is there a simple one-liner to convert a given base 10 integer to a string representation of this integer in some desired base 'b'? Is there a way to do this avoiding the subscript indicating the ...
367 views

### Caching RecursionLimit::reclim error

I am learning how to catch exceptions, RecursionLimit::reclim in particular. To see how it works, I came up with the following example: ...
256 views

### Creating a dynamic plot directly from the recurrence relation

I have the following recurrence relation that has no general solution: $$x(t+1) = \frac{x^2 + x(1-x)(1-sh)}{x^2 + 2x(1-x)(1-sh) + (1-x)^2(1-s)}$$ In Mathematica language it gives: ...
207 views

### Importing a Base64 encoded string

everyone, I'm handling some paragraphs enconded with Base64 from CSV file format. The problem is that Mathematica can't decode it. It seems Mathematica Encode/Decode their own Base64. I'm thinking ...
601 views

### Using If statements internal to Table [duplicate]

Is there a way to use If statements with Table? To give a kind of ridiculous example that captures to spirit of what I'm trying ...
501 views

### Research positions of lists of varying size

I'm new to the site and I am French, so I ask your indulgence for my future mistakes in English. I would like to optimise the following code : ...
82 views

### Why do Permute and PermutationReplace not invert one another? [closed]

Why do Permute and PermutationReplace not invert one another, as stated in the documentation? If we have an identity ...
548 views

### Distance between two line segments in 3-space

I need to compute the distance between two line segments in a project. After googling, I found this algorithm and used it to implement a Mathematica version: ...
492 views

154 views

### How to handle a sparse array of lists

I have data in the form of a sparse array of lists. For example: ...
37 views

### Storing solution to x and y [duplicate]

If I do sol=Solve[{2x+2==y,3x+9==y},{x,y}] then Mathematica will tell me {{x -> -7, y -> -12}} But I would like to ...
76 views

### Finding undetermined coefficients with boundary conditions

I have 2 equations which are; To[x_] := c1 E^(-a1 x)/2 + c2 E^(a1 x)/2 + a2 Tu[x_] := c3 E^(-a3 x)/2 + c4 E^(a3 x)/2 Tu equals almost zero ...
48 views

### Problem with parentheses and ScriptBaselineShifts

Style[ DisplayForm@RowBox[{"(", SubsuperscriptBox[2, 6, 7], ")"}], 18, Bold, ScriptSizeMultipliers -> 1, ScriptBaselineShifts -> {1, 3}] or for ...
224 views

### Katz Centrality [closed]

I want to calculate the Katz Centrality of large graphs. The Mathematica command to do that is KatzCentrality[g, $\alpha$] and it is also fast. However I realized that there is a mismatch between ...
221 views

### How to solve this numerically?

May I ask what is the best way to evaluate ...
107 views

### How to operate with function body without evaluation

I have several functions (let a[x] and b[x]), defined as expressions with integrals and differentiations. I want to perform some ...
51 views

### How to find out how Mathematica performed an integration? [duplicate]

In terms of integration, I usually utilize Mathematica 9 to compute scattering amplitudes in quantum field theory. Recently, I employed it to compute a particularly difficult integral, and it ...
560 views

### Use de Casteljau algorithm to create Bezier Curve in Mathematica [closed]

Is anyone can tell me how to create Bezier Curve with given Bezier polygon and parameter t by using de Casteljau algorithm (not the Bezier function in Mathematica)in Mathematica code? Thanks a lot!
120 views

### Multiple Simulations of a Markov Chain

I am trying to create a simple series of Bernoulli bits whose probabilities follow a two-state Markov chain. ...
76 views

### Make several separate Manipulate controls on a single line?

How do I make several different Manipulate controls appear on a single line? I currently have both a Slider and an ...
51 views

### Inverse Z Transform returning complicated expression

I want to study how the Z transform changes with the sampling rate T, in a closed loop system. The command I'm using to do this is: ...
760 views

### Fast code to generate large random graph with fixed degree sequence

I'm trying to create a function so to generate large random graph with a fixed degree sequence $\{v_1,v_2,\dots,v_N\}$, where $N$ is the number of vertices in the graph. The Mathematica function that ...
79 views

### Running function - updating list - run function etc

I am making a larger program, so I would prefer to give a short example of my problem: ...
159 views

### Index of iteration inside NestList [duplicate]

I have a list of RandomReal: delta = RandomReal[{-0.01, 0.01}, 1000] I want to add each element of the list to the ...
435 views

### Why IntegerPart[x/(x/2)]=1?

Consider this code x = 0.109354682484; IntegerPart[x/(x/2)] (* 1 *) Precision[x] (* MachinePrecision *) Why does it give 1 ? Version number: 9.0 on Mac 10.9.2 ...