1
vote
1answer
69 views

Computation time depends on the matrix elements!

Consider these two lists of matrices, matrix and matrix2: ...
5
votes
0answers
44 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: ...
1
vote
1answer
59 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 ...
4
votes
2answers
198 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 ...
3
votes
1answer
78 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 ...
0
votes
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 ...
1
vote
0answers
134 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 ...
6
votes
2answers
293 views

How to make a 2D plot of 3 variables (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]; ...
3
votes
1answer
78 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 ...
2
votes
2answers
211 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] ...
16
votes
2answers
453 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: ...
3
votes
1answer
213 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.
-1
votes
1answer
62 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: ...
7
votes
1answer
184 views

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

I have produced this image by applying a Gaussian image substraction, Binarize, Colornegate, and ...
0
votes
1answer
60 views

How to split (large) arrays like this?

I want to split this table (list/array) ...
1
vote
0answers
57 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 ...
0
votes
0answers
164 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 ...
0
votes
1answer
89 views

Extracting parts of a list subject to a condition

I've got a list like following: ...
0
votes
0answers
287 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. ...
2
votes
2answers
217 views

Rounding to the nearest decimal and pasting such output into an Input cell

This question is very closely related to two earlier ones: Rounding to the nearest decimal and How do you round numbers so that it affects computation? but confronts an additional issue not ...
3
votes
0answers
85 views

Is there a way to do a symbolic PLUR decomposition of a matrix? [duplicate]

I am looking for a way to achieve the PLUR decomposition of a maitrx, as given in this paper here. The equivalent syntax in Maple is: ...
3
votes
1answer
142 views

IsomorphicGraphQ giving an error when the graphs contain multi-edges [duplicate]

If I run IsomorphicGraphQ on the following graphs, I get an error I don't understand: ...
0
votes
1answer
59 views

How can I solve a difference-differential equation with new variable? [closed]

I want to ask how we can solve this equation: $$ xyy' = x^2+2y^2 $$ I tried with new variable $$u=y/x$$
15
votes
2answers
1k views

What happens when you divide by ##?

I've been playing around with sequences a bit. In particular with using ## with unary and binary operators. Let's start simple, the following all make some kind of ...
1
vote
1answer
115 views

Table shifting bug?

I use Mathematica for calculation of coordinates in format {x[t], y[t]}. For this purpose, I wrote Module T...
2
votes
1answer
156 views

How to speed up my code about Divisors?

This code is about PE496 In[21]:= ParallelSum[n*Count[Divisors[n^2], a_ /; n < a < 2 n], {n, 1, 10^5}] // AbsoluteTiming Out[21]= {5.987342,10724527832} I ...
1
vote
1answer
117 views

Periodic Gaussian Process's Covariance Matrix not Positive Definite

I'm trying to implement a periodic Gaussian Process: GP = Table[Exp[-.1 Sin[\[Pi] (x - y)]^2], {x, 0., 3, .1}, {y, 0., 3, .1}]; PositiveDefiniteMatrixQ[GP] ...
3
votes
1answer
132 views

Evaluate specific cells in Mathematica

I have a very simple problem with Mathematica that I couldn't find an easy answer to. I have long notebook with a lot of cells and want to evaluate a specific cells inline from another cell. So far I ...
0
votes
2answers
154 views

Ploting a topology that accepts saddle point in 3 dimensional plot [closed]

In order to visualize a saddle point, a common example given by Wikipedia is $z=x^2-y^2$. Plot3D[x^2 - y^2, {x, -5, 5}, {y, -5, 5}] I would like to have a 3d ...
1
vote
0answers
103 views

Web embedding of CDF with dynamic content

I made a widget that calculates some values as variables are dynamically changed with sliders. I want to embed the cdf here: http://www.phys.ufl.edu/~majewski/nqr/match As you can see, this isn't ...
2
votes
0answers
918 views

Fourier Transform of Absolute Value

If you ask Mathematica to provide the Fourier Transform of a singular functions it is likely to provide an answer that while nearly correct, is technically incorrect and it will do so without a word ...
5
votes
3answers
261 views

SQL-like computation on Dataset: Aggregate function

Assume that I have this dataset a = Dataset[{<|"A" -> "A1", "B" -> 2|>, <|"A" -> "A1", "B" -> 3|>}] How can I get the total of Key["B"] ...
0
votes
0answers
75 views

Is it possible to use EdgeCapacity in FindMinimumCostFlow?

I'm having trouble getting the EdgeCapacity feature in FindMinimumCostFlow to work. I have attached a simple example. We have a simple graph of four vertices. There are two paths from the "source" ...
1
vote
1answer
72 views

Implementation of a recursive function [duplicate]

I have been trying to implement a recursive function, but still struggle. Here's what I have written: ...
1
vote
1answer
136 views

Efficient method of raising matrix to a variable power?

I have a $2 \times 2$ matrix $A$, where each element is a 12th order polynomial in a parameter $a$. I need to raise this matrix $A$ to the $-t/T$ power, where $T$ is a known scalar (for this ...
6
votes
1answer
156 views

Can a field be used for both input and output (example: exchange rate calculator)

Suppose I want to build a simple currency converter like this one: The functionality is straightforward: enter an amount in any field box, it gets converted into other currencies whose fields are ...
1
vote
1answer
66 views

Manipulate duplicates the output

I not sure if the question has been asked or not. I tried to find something similar without success. I have this small code: ...
4
votes
0answers
92 views

A simple experiment to understand CUDAFunctionLoad

In an attempt to answer my own question (Beginner CUDA: two dimensional blocks and two dimensional threads?). Please excuse the long post, it contains for examples I constructed as an experiment to ...
1
vote
1answer
96 views

Exporting large data with H5 format cuase crash

When I export a list of 49000 matrices which are 100by100 I get some errors. Export["data.h5", data]; Returns: ...
-2
votes
1answer
93 views

Ordinary Differential Equation Question [closed]

I was wondering whether someone might be able to point me in the right direction for this ODE that I am trying to solve? It is: $$\frac{du}{dx} = \frac{x}{s}-\frac{1}{2}-\frac{u}{x}$$ with $s$ ...
1
vote
0answers
172 views

Is there an equivalent of “pmtm” of MATLAB?

Recently I'm spending my time implementing some patients' analysis using Mathematica Classify function. But I need to rewrite some MATLAB functions for computing ...
2
votes
1answer
196 views

Integration of a high oscillatory function

I want to get the numerical result of the integration below: ...
0
votes
1answer
177 views

Finding CPU time of more than one expressions

I want to find the computational time (CPU time) of my code. When I use TimeUsed or Timing commands they give the CPU time of ...
1
vote
1answer
261 views

Locating Periodic Orbits

Here is the code for the numerical integration of an orbit. First the module for the definition of the equations of motion. ...
1
vote
1answer
231 views

Fitting an imported .txt data

I have some data in a .txt file, and I'm trying to import it to Mathematica and fit it with a function. The data is a 647x647 matrix of values. This seems like it ...
7
votes
2answers
216 views

Apply ColorFunction to an Image [duplicate]

is there a faster way to change the colors of an image from grayscale to something like this: ...
1
vote
0answers
157 views

Display error on frame label after exporting image to pdf

This is a simple plot, it looks fine in Mathematica. But after exporting it to pdf file, the display of vertical frame label has an error. The "33" in the subscript "epsilon33" becomes somewhat a ...
2
votes
2answers
130 views

Let mathematica combine integral limits

Is there a way to teach mathematica to combine integral limits according to $\int_a^b f dx+\int_b^c f dx=\int_a^cf dx$ to simplify expressions like $\int_0^1 f[t] dt+\int_1^x (1+f[t]) dt$ to $\int_0^t ...
1
vote
1answer
53 views

Select equation in a list of conditions

I have an equation list {a'[t]==b[t],c'[t]==d[t],x'[t]==y[t]} and upon running FullSimplify[] it becomes ...
0
votes
1answer
93 views

convert list to equation form

Suppose I have a list condition={f'[t]-3,g'[t]-f[t]} and now I want to use DSolve on it so I need to convert the list to ...

15 30 50 per page