2
votes
1answer
101 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
83 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
59 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: ...
0
votes
1answer
50 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 ...
1
vote
2answers
79 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
36 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?
3
votes
1answer
44 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
40 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
89 views

Help with functions in Mathematica

Still learning how to do things in Mathematica. I want 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 ...
6
votes
1answer
171 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
55 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
57 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: ...
-1
votes
0answers
36 views

Numerical value of expression not solving function on Mathematica 10 [closed]

I'm trying to solve below calculation using Newton Raphson method: ...
0
votes
0answers
78 views

Selectively remove ticks in a plot

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
33 views

How to use ListPlay and PlayRange in Manipulate

The following correctly produces a click sound: ...
1
vote
2answers
70 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
40 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
48 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
42 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
89 views

Inverse of Times->Sequence

Suppose there is a list list={abc} then the replacement Times->Sequence gives ...
6
votes
3answers
314 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
38 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
41 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
25 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 ...
-2
votes
1answer
30 views

Function that returns the divisors of an integer [closed]

Does Mathematica have a build in function that takes a number and returns the numbers that divide it? I was unable to find anything in their docs. If not, how would I accomplish this: For example how ...
0
votes
1answer
43 views

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

i have this function: ...
1
vote
1answer
31 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
213 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
37 views
0
votes
0answers
21 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= ...
-3
votes
3answers
111 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 ...
0
votes
0answers
25 views

Face Grid does not show up in Manipulate? [closed]

My code: ...
1
vote
3answers
55 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
46 views

ListPlot and AspectRatio

Here is a simple scenario ...
1
vote
1answer
44 views

Find maximum Log likelihood for repeated random variates

I have the following code ...
1
vote
0answers
31 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
74 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 ...
12
votes
1answer
205 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 ...
3
votes
1answer
77 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
42 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 ...
1
vote
0answers
75 views

Can I use Mathematica 9.0 to open an MX file produced by Mathematica 10?

I have used Mathematica 10 installed on a workstation of university's lab to run a NDSlove code that produced a .mx file. Then I copy the ...
0
votes
0answers
89 views

A faster way to replace variables than ReplaceAll

I noticed that for large matrix, the rule /. is very slow. In the example below, the combination of memorization and the replacement "/.sol[n-1]" inside the definition of sol[n] turns the code ...
0
votes
0answers
56 views

How to prevent long evaluation and infinite loops

I'm new to this, so sometimes I accidentally ask Mathematica to do calculations with numbers so big that it can't handle it and it immediately freezes my laptop to the point where there's nothing I ...
2
votes
2answers
109 views

How to get the digits after the decimal point

I have N[Sqrt[2], 8] which outputs 0.4142136 How do I get the 4142136 part out of it? I ...
0
votes
1answer
47 views

Copy/export a plot as vector EMF

I want to generate a plot using Plot, copy it and paste to a Word/PowerPoint document as a vector EMF file in order to preserve best quality of an image. However I found out that if I Copy Graphic ...
2
votes
3answers
43 views

Perform For-loop and show output which meets a certain criterion

I am new to Mathematica and I have a For loop like so: For[i = 0, i < 15, i++, PowerMod[i, -1, 15]] Currently it doesn't output anything. The calculation I am ...
1
vote
2answers
35 views

Imploying a sequence in a series

I would like to have the following sequence, $(a)_n$, in a series where $a_0 = 1$ and $a_n = a(a+1)\cdots (a+ n -1)$. The series I have is $$ 2\sum_{n=0}^{\infty}\frac{(1/2)_n}{n!(2n+1)^3} $$ I know ...
1
vote
2answers
44 views

How to Simplify exponents?

I need to divide a Gaussian Mixture by it's widest component. When I do this, the exponents of the output end up a mess of terms in need of simplification, but ...
0
votes
0answers
20 views

Manipulating nested matrices columnwise [duplicate]

I have a project that requires analyzing large volumes of excel sheets at the same time. I have been having trouble figuring out how to index the imported files and manipulating them. The way I am ...
3
votes
1answer
91 views

Rasterize is influenced by WindowSize of the notebook where I run it

The two images show what I mean: Actually, the problem I have is that I need the images as in the second case, that's the whole expression in one row. In realty, the code is even more complex and ...

15 30 50 per page