0
votes
2answers
152 views

Random geometrical graph generation

I would like to generate a random graph on $[0,1]^2$. Each node is connected to one other if the distance between two nodes is say 1/4 or less. Here is an example with 50 nodes and 200 edges I would ...
2
votes
2answers
266 views
2
votes
1answer
177 views

General function taking general number of arguments

The following is an edit of this post, for which a working solution was provided by John McGee. I have a different function and am not sure how to adapt the solution for it: I want to construct a ...
3
votes
1answer
158 views

TimeSeries - Values & Dates

How can I display a TimeSeries object in a Table or Grid so that I could see the Dates and corresponding Values next to each other? I wrote the following code: ...
1
vote
1answer
79 views

Getting result from Maximize

I'm trying to get maximization result from Maximize function to use it in later calculations. At the moment I use the following code: ...
0
votes
0answers
61 views

Trying to write a program to find an approximate harmonic function on a given graph using relation method

So given an undirected graph with two vertices that have fixed values assigned to them, a harmonic function is a function that assigns values to all other vertices such that the value assigned to each ...
4
votes
1answer
270 views

VertexRenderingFunction (or EdgeRenderingFunction) with movable nodes?

In GraphPlot, I'd like to use VertexRenderingFunction (VRF) and have the resulting object behave the same way under dragging verticies as it does when I do not use VRF. The same issue occurs for ...
2
votes
2answers
245 views

How can I make an animated demonstration of the Wigner semicircle distribution?

With Mathematica 10, it's possible to draw the semicircle distribution of R. Wigner: ...
6
votes
2answers
625 views

Integral does not converge (when it should) [duplicate]

Bug introduced in 10.0 and fixed in 10.0.2 I was looking at integrals like: Integrate[HermiteH[50, x]*Exp[-x^2], {x, 0, Infinity}] which gave me a "does not ...
5
votes
3answers
272 views

Running PowerShell commands in Mathematica

I'm trying to execute a PowerShell command using Mathematica. Someone has made it before? I tested my command direct in PowerShell, and it worked nice, but no idea on how can I make Mathematica to ...
1
vote
1answer
402 views

How to add error bars to a fit function in Mathematica 10?

My professor gave us the following code to fit a Lorentzian to our data. I want to add vertical error bars (with individual error found in the experiment) to the plot but I don't know how. Any ...
2
votes
1answer
108 views

Find tangency of InterpolatingFunction and circle

I am trying to use a system of equations to solve for the common tangent of a (polar) InterpolatingFunction and a circle. Unfortunately, both NSolve and FindRoot don't yield results, even when I ...
0
votes
2answers
101 views

Function that creates a table from two lists

I have two lists shown below: list1 = {(0,0,0,0),(0,0,0,1),(0,0,1,0),...,(1,1,1,1)} list2 = {1,5,5,5,...,5} How can I construct a function that outputs a table similar to this: $$\begin{array}{c|c} ...
2
votes
1answer
122 views

Odd behavior matching powers of pi

I have a long list of generated values from which I want to remove "weird" ones like Sin[Sin[1]] and Pi^2/4. However, trying to ...
0
votes
2answers
246 views

How to construct a linear feedback shift register

Are there any posts regarding the construction of a LFSR (Linear Feedback Shift Register) in Mathematica? I can't seem to find any and I am not sure how I would construct one.
1
vote
2answers
66 views

Inconsistency in arithmetic on list elements [closed]

As expected, {a,b,c} - {a,a,a} (* {0, -a+b, -a+c} *) Or the same result can be obtained with less typing, thanks to implicit duplication of the subtrahend: ...
1
vote
1answer
310 views

Discrete Fourier Transform of a vector defined on a 3D lattice

In my research I need to compute the Discrete Fourier transform of a vector defined on a 3D lattice (a cube) to the "reciprocal" lattice. This is quite new to me so before proceeding i wanted to be ...
2
votes
2answers
159 views

Coloring a map of GeoRegions

I know that I can plot multiple GeoGraphics results on the same map by using something like Show[Graphics@@p1, Graphics@@p2], but it doesn't really work (seems to ...
0
votes
1answer
93 views

Built in function to convert list of numbers into list of binary numbers [closed]

Does Mathematica have a build in way to convert a list of numbers into a list of binary numbers? If not how can this be accomplished?
7
votes
2answers
134 views

How can one create hanging indent within text?

Short of writing a highly specific function for particular text strings, is there a simple way to format text, as say in a bibliographic record, to produce a hanging indent (first line of full with, ...
0
votes
1answer
95 views

How to take (use, reuse) any data, returned by Wolfram Alpha?

Suppose I wish to use Boltzmann constant in calculations, and I queried it from Wolfram Alpha: Now, how to take any of selected values? If I copy paste I get garbage. How to perform?
0
votes
1answer
132 views

Help with functions in Mathematica

I'd like to make a function that has many parts. Doing this in something such as Java, which I am familiar with, would be simple. In Mathematica I have these "pieces", which I want to put into a ...
8
votes
1answer
420 views

How trustworthy is NMaximize?

Suppose I solve a constrained optimisation problem using NMaximize. How confident can I be of the accuracy of the result? For concreteness, suppose that F,G are ...
1
vote
1answer
165 views

How do I utilize the dynamic input field function in the manipulate function? Can I use this functionality to import a .xls from an URL dynamically?

Im trying to get my program to import a .xls for manipulation, I need to import the .xls at an url location dynamically, I did have this at the beginning of my code: ...
-3
votes
1answer
134 views

Miller-Rabin algorithm [closed]

I want to implement the Miller-Rabin algorithm in Mathematica to check if a number is prime with at least 99.99% probability. I used this: ...
3
votes
0answers
154 views

Selectively remove ticks in a plot [closed]

I would like to remove some ticks from a plot without having to edit manually the list of ticks generated automatically by Mathematica. My aim is to have a plot where the axis label are close to the ...
1
vote
1answer
99 views

How to use ListPlay and PlayRange in Manipulate

The following correctly produces a click sound: ...
1
vote
2answers
141 views

Format a formula in human readable form

Is there a way to make a formula display in a human readable form? I have something like Binomial[(10000000 - 1), x]*(1/2^24)^x and I'd like it to display using ...
1
vote
0answers
67 views

What do the default shapes/colors in DiscreteMarkovProcess Graph mean?

In making markov chains, I know how to do that, but I am curious as to what the different colors, and shapes of the vertexes in the graph output mean. as example; ...
1
vote
1answer
90 views

How to make strong assumptions?

Or put in another way, how to make a variable behave as it belongs to a specific domain, even outside the use of simplify or other commands alike? For example: ...
0
votes
1answer
64 views

EdgeRenderingFunction For 2 Vertices in a Loop

Assume there is a set of rules: set = {"A" -> "B", "B" -> "A", "B" -> "C", "C" -> "D", "D" -> "A", "C" -> "C"}; which we want to graph using ...
2
votes
2answers
97 views

Inverse of Times->Sequence

Suppose there is a list list={abc} then the replacement Times->Sequence gives ...
7
votes
3answers
401 views

Functional equivalent of a For loop referring to consecutive elements in a list

I have implemented this function which smooths the values in a list by, if it encounters a zero, replacing this entry by the average of its two neighbours (apart from the first and last values of the ...
-1
votes
1answer
65 views

How do I plot lat/long points in the Atlantic Ocean? [closed]

How do I plot lat/long points on the water? Such as the Atlantic Ocean? Here are some points I'm trying to plot: ...
1
vote
2answers
109 views

Converting lat/long to x/y coordinates, to generate random variates from a Bivariate Normal Distribution [closed]

I am trying to convert latitude and longitude points to x/y coordinates, generate random variates from a bivariate normal distribution, and then convert those random x/y points back into latitude ...
0
votes
1answer
55 views

Fine precision control in IntervalSlider

I would like to develop a simple slider for exploring a wide range of intervals on the real line. Is it possible to get the MinimalSize of IntervalSlider to work ...
0
votes
1answer
131 views

How to plot first and second row from matrix to a graph

i have this function: ...
1
vote
1answer
97 views

Replacing Logic operator List and generate combination of variables

so I'm trying to do the following starting from a list of inequalities: ...
2
votes
5answers
232 views

Making loop based off what I can say in words

I have a list of values a: {1,4,11,14} I want to print out values that satisfy b(1+a) = 0 mod 15 where b are the values from 0 to 14. The output I am wanting is ...
0
votes
0answers
59 views
0
votes
0answers
28 views

Solving an inhomogeneous partial differential equation [duplicate]

Here is my inhomogeneous partial differential equation: $$ \left ( \frac{\partial^2 }{\partial \rho^2}-\frac{1}{\rho} \frac{\partial }{\partial \rho} + \frac{\partial^2 }{\partial z^2}\right ) \psi= ...
-2
votes
3answers
270 views

How can I plot a polygon with n sides inscribed in a circle and show the area?

I am doing some work on Archimedes and want to show what the area of a regular n-sided polygon is within a circle. My professor from two years ago was able to show it with an adjustable slider that ...
1
vote
3answers
145 views

Sorting a list of points based on their euclidean distance

I need to take a list of random points and then sort them from least to greatest based on their Euclidean distance from a certain point. How would I do this?
1
vote
1answer
104 views

ListPlot and AspectRatio

Here is a simple scenario ...
1
vote
1answer
99 views
1
vote
0answers
71 views

InstallService to Brenda

all, I do not have good understanding of the Web Services. However, following the instructions on BRENDA (enzyme database) web site, I can use their SOAP service in perl programs. Then I tried to use ...
0
votes
1answer
96 views

How to improve this function that selects parameters from arbitrary distribution using Recursion?

Below, I have defined a function using Which to select model parameters based upon various conditions. My questions are: Is there any danger in writing this function using Recursion? Is there a more ...
15
votes
1answer
290 views

The efficiency compare between Flatten[#, 1] & and Join @@ # &

Err..Often I met the situation to join lists at the first level and I used to just Flatten[#, 1] &@ them. However, I found(when glance over the mathematica.stackexchange.com) someone else prefer ...
5
votes
2answers
400 views

CUDA 6.5, Mathematica 10.0.2, and Ubuntu 14.04

I have CUDA 6.5 working fine on Ubuntu 14.04. Mathematica recognizes the driver (Nvidia 340), but CUDAQ[] returns False and I cannot get any CUDA functions to work in Mathematica. I have created ...
1
vote
1answer
134 views

Assuming variable is plus or minus 1

I have a long calculation that I am doing, which involves a particular variable h, which in the end, is either +1 or -1. (I would like a general result that is true for both cases.) Since h only ...

15 30 50 per page