# All Questions

1answer
102 views

### Making table of matrix product and efficiency

I want to make a table in which each element is a matrix product: ...
3answers
559 views

### How can FactorInteger be so slow if PrimeQ is fast?

My 8th grade son had a homework problem to find a prime factor of 99!-1. I thought to be clever/lazy and used FactorInteger[99!-1], but it takes forever. PrimeQ[99!-1] very quickly gives False. It ...
2answers
269 views

### How to NOT simplify fraction

How can I prevent Mathematica from simplifying fractions? What I would like to do is run a test on a list of fractions to see how many are in their reduced form. For example, I have a list: ...
1answer
94 views

### Transform a table (list of associations) to a flat association

I would like to transform a table like ...
3answers
150 views

### Multiple bwspec for BoxWhiskerChart

If I want to make a horizontal boxplot (with outliers) for y: ...
0answers
58 views

### How to put Black as the background colour, and text as white in Mathematica? [duplicate]

My question is equal to this one,even though by different reasons. I would like to know how can I change the white background to black, and the black text to white. I'm asking again, since a year has ...
2answers
173 views

### When analytical and numerical methods do not agree - Case study with Maximum Likelihoods methods

Here is the probability distribution I am interested in: $$P(q)=C e^{4 n s q} q^{4 n \nu - 1} (1 - q)^{4 n \mu - 1}$$ , where $e$ is the constant of Euler and $C$ is constant so that the whole thing ...
1answer
93 views

### Find $r$,in terms of variables $U$ and $V$

I want to solve this equation, for $r$: ...
2answers
151 views

### How to compute LLL-reduce basis from lattice in Mathematica? And factor N

original article Clear. What is k? What is suitably large? I already have large numbers. I tried this WITHOUT k: ...
1answer
109 views

### Vectorize pixel SphericalPlot

I have a question about Mathematica images exporting. I have created 3d (SpericalPlot) with coloring function on it and then exported it to pdf. Is there any possibility to make more vector graphics ...
1answer
104 views

### Loading Packages with Parameters

I have some packages that uses database connections inside it, let's call it ConnPackage. The connection IP is a public package variable, and has a default value: ...
1answer
52 views

### I'm trying to iterate a function with two variables [closed]

I have a function that calculates temperature that is dependent on both temperature and time. I want to be able to iterate the function to calculate a new temperature and then use that as the next ...
1answer
216 views

### Orderless pattern matching

The MMA docs state that "In matching patterns with Orderless functions, all possible orders of arguments are tried". Why then does the following not work? ...
2answers
154 views

### How to show well the convexhull in 3d?, for a given set of points

I´m trying with ...
2answers
175 views

### How to show surfaces as a implicit plot in 3d?

I was trying to show a feasible region with these lines: ...
1answer
180 views

### Polar Decomposition

I'm new to Mathematica 10 (half-a-month user). I'm looking for a function of polar decomposition but for now I cannot find it. Can anyone tell me about related functions. Thanks in advance.
2answers
92 views

### Decimal-to-ASCII conversion

I have to write a program that converts a number (decimal notation) to an ASCII string. For example, x = 26728 (or 0x6868) and the string is "hh". I wrote this, but it seems that it is not the ...
1answer
33 views

### Full superset not displayed on Manipulate slider

I wish to incorporate ODE solution with Bondary condition sets: ...
1answer
88 views

### How to solve Mod equation with mathematica [closed]

i'm pretty noob with mathematica but i need to solve an equation: $$c\equiv m^2\pmod n$$ I tried something like ...
1answer
70 views

### How to convert cumulative to incremental for plot

Trying to show a plot of a power function $Y = a X^b$, where $Y$ is cumulative cost and $X$ is cumulative shipments where we'd like to see the incremental cost. For $X_1$ the cost is $Y_1$, for $X2$ ...
1answer
74 views

### Computing a Sequence using Recurrence

I posted a similar question earlier today, but unfortunately I realized after several hours that I over-simplified the problem for this forum. There is a very good answer to the Computing a sequence ...
0answers
41 views

### Change system options in package

I use Mathematica mostly for numerical calculations, and sometimes the performance of numerical calculations can be greatly improved if the high-precision arithmetic can be switched off by ...
4answers
246 views

### Function for a series of joined slopes

I need a function for a series of joined slopes and my solution feels a bit kludgy. Is there a better way? A list of pairs of transition points and slopes: ...
1answer
153 views

### Creating formulas for the Moodle CMS question bank

Edit I have made some progress on this problem, which is given below the question. I use the Moodle course management system for much of my teaching, and the CMS comes with a tool for creating ...
0answers
44 views

### Syntax error in debug mode

Bug persists through 10.1 It appears that in debug mode, the \[Piecewise] symbol gives syntax error. Is it a bug? Are there ways to fix that except write it in ...
2answers
83 views

### Parametric Function

i'm struggling to implement the following parametric function: I need to create a g function with two arguments (w and v). If w and v are not empty lists, then it will return a list containing two ...
1answer
75 views

### Local evaluation works, CloudDeploy did not work

I a playing around with my programming cloud account. What I have found, interactive functions often are not working because there are several details that are not implemented into the cloud. So I ...
0answers
43 views

### Why does Save change my data precision?

I have some data from some Mathematica program, and it appears that the precision of the data has been slightly changes when I save the data and reload it again. ...
1answer
101 views

### How to determine if directories with executable permission and not

I have some directories that have the UNIX executable permission some does not. What tests could I write in Mathematica to test it?
3answers
116 views

### Computing a sequence by recurrence

I am trying to create a list where each element of the list is calculated using the sum of all previous elements of the list and also uses the $N$th element of another list. The initial value of the ...
1answer
59 views

### Computation time depends on the matrix elements!

Consider these two lists of matrices, matrix and matrix2: ...
0answers
32 views

### Can I force Mathematica to use machine precision? [duplicate]

Some built-in functions (like Exp) give an arbitrary precision result, even when the argument is a machine precision number. Example: ...
1answer
54 views

### Compute the evolution of percentages from a data file

My data is stored in external .out files which contain six columns and a large number of rows. I know that I have to provide a small sample but the structure of my data is so unique, so I provide the ...
0answers
22 views

### how can sent data to Mathematica and get result in java? [duplicate]

I try to develop an math script calculator in java. My script has advance math functions and I can't calculate them in java.(for example limit, plot, ... ) Is any way for sending script to ...
2answers
186 views

### Generate lists that satisfy a condition in an efficient way

The following code produces lists of sublists with maximum length 5 that shuffle zeros around an ordered list (here {1,2}). It produces all permutations while ...
1answer
59 views

### Specifying the style of edges in directed graphs [closed]

How do I specify the style of individual edges in a directed graph (in Mathematica version 9)? Consider maybe this ...
0answers
12 views

### all does not work [duplicate]

Thanks blochwave for giving me a detailed answer, but I have already used all these methods and none of them has worked well, it is clearly written in mathematica "get help" file that the Timing[] and ...
0answers
100 views

### Inverse Fourier Transform - wolfram alpha vs Mathematica 9.0

I'm facing an interesting problem. I'm trying to do this simple task: InverseFourierTransform[0.031622*Exp[0.4995ω^2], ω, t] Mathematica can't handle it for some ...
2answers
187 views

### How to make a “flat” plot (or a grid of 2 plots) of 3 variables in Mathematica (sample picture attached)

Is it possible to plot that kind of graph in Mathematica? (picture attached) If yes, it can be used to visualise a simple "balance system" of the form: X = f[e]; ...
1answer
66 views

### Merge Roots of Polynomial

How can I make mathematica "merge" solutions of a polynomial by using $\pm$ instead of listing the two solutions fully with only one sign difference? In particular, I am looking to "compactify" the ...
2answers
145 views

### How to produce a table with column and row headers included?

I have searched and have not found a solution. n = Table[i^2 + j*3, {i, 3}, {j, 7}] // TableForm Export["stuck.xls", n] ...
2answers
399 views

### Why is my data 10 times slower than random data when doing matrix multiplication

I have some data generated from some program, and it appears that matrix multiplication on these data are about 10 times slower than on some random data: ...
1answer
147 views

### Download Youtube Videos

Is there a way to display or download youtube videos in Mathematica. Youtube is HTML5 enabled so I am hopeful there might be an easy way.
1answer
50 views

### Search optimum on connected simulation

Do you know how can I find minimum/maximum of a simulation written in a Module. The simulation calculates a potential value to a territory after some steps. It would seem like this: ...
1answer
116 views

### Is there a way to characterize a winding object in an image?

I have this image, which I've already ran through a Gaussian image substraction, Binarize, Colornegate, and MorphologicalComponents: As you can see by the different colors, the colored parts are ...
1answer
55 views

### How to split (large) arrays like this?

I want to split this table (list/array) ...
0answers
43 views

### Input Reduce[Mod[a + x, l] == 0, x]' and output x == -a + kl`?

Reduce[a + x == k l && k > 0, x] (* k > 0 && x == -a + k l *) I think a + x == k l and ...
0answers
82 views

### Symbolic Tensor Algebra

I need to perform basic tensor algebra in order to double check some very complicated simplification. It's nothing fancy, it just has so many factors by the end that it's hard to tell if an error has ...
1answer
85 views

### Extracting parts of a list subject to a condition

I've got a list like following: ...
0answers
90 views

### Extracting parameters from a fitted function

Let's say I have written a function which performs convolution and returns value calculated for the time чtч. ...

15 30 50 per page