8
votes
2answers
371 views

Is there a bug in FindClique?

If h is a graph, FindClique[g, {n}] should return a clique on exactly $n$ vertices if one exists in ...
1
vote
1answer
121 views

DSolve with Absolute Value

When playing around with DSolve, I enter the following: DSolve[{Derivative[1][y][x] == x + Abs[x]*y[x]}, y[x], x] The output is: $$y(x)\to e^{\frac{1}{2} (x \...
1
vote
1answer
74 views

How to change the expressions in terms of a specific variable?

I have a series of analytical equations: ...
-1
votes
1answer
90 views

Define a function and then integrate and plotting of the solved function [closed]

First I want to solve for $n_{0}$ for a fixed value of $n$, lets say $n=1$ $$ n= n_{0}+ \dfrac{1}{2}\int_{-1/2}^{1/2}dq\left(\dfrac{e_{q}+Un_{0}}{\hbar\omega}-1\right) $$ where $e_{q}=2[1-cos(2\pi q)...
1
vote
2answers
125 views

Conditional Convolution

I was hoping to incorporate an If function into a Convolve operation, as in ...
0
votes
1answer
108 views

Method that combine LinearSolve and Dsolve for a set of differential equations?

I have a matrix for example: $\begin{bmatrix} 0 & 5 & 0 & 3 & 3\\ 5 & 5 & 5 & 3 & 1\\ 0 & 3 & 0 & 3 & 10\\ 1 & 3 & 2 & 3 & 10 \\ 1 &...
1
vote
1answer
107 views

System of differential equation with delay

I try to solve this differential system with delay: ...
3
votes
1answer
117 views

Dynamic Output during ParallelMap

I can't seem to figure out how to dynamically output a variable that is being used in a parallel evaluation. Below is an example function that demonstrates my problem. ...
0
votes
1answer
72 views

Integration does not give real value

The code below must be obvious. We are trying to integrate a complicated function from 0 to 1. ...
0
votes
1answer
233 views

Iterating over a 2D list [closed]

I want to collect the result of a function in a data structure. In java the loop looks like the following code: ...
2
votes
1answer
115 views

Pausing a dynamic display

I'm trying to display some graphs, which were defined with plot above this line of code. The parametric plot moves through all of the x values, the others are stationary. I would like the parametric ...
0
votes
1answer
80 views

Is there a way to have FindInstance or Solve give only positive integer solutions?

I keep getting either negative or super long answers or super long negative answers in no particular order :\ ... Is there a way to only ask for positive solutions? (here we want 0 < x<(10^12+y) ...
0
votes
2answers
651 views

Lotka Volterra Equation Plotting

So I have a basic Mathematica assignment where we need to numerically solve a Lotka-Volterra predator-prey population equation. So far I have managed to come up with this ...
2
votes
1answer
77 views

Why is RandomVariate of special probability distribution doesn't working in all cases

I would like to generate a random variates in Mathematica 9 with this distribution: ...
0
votes
0answers
66 views

How to export a PNG with an alpha channel? [duplicate]

Is "RGBA" not a supported colorspace? Export["test.png", RandomImage[1, {100, 100}], ColorSpace -> "RGBA"]
5
votes
2answers
273 views

Optimising coefficient finding functions

I'm seeking a generalisation to this question, where I am looking to list the coefficients (without repetition) to monomials of the form $$(x_{1}^{3}+x_{2}^{3}+x_{3}^{3}+x_{4}^{3})^4\cdot(x_{1}^{2}+...
3
votes
2answers
3k views

Is it possible to recover an unsaved notebook after closing it?

I just Ctrl-Alt-Deleted out of Mathematica after I crashed it while running. I had not saved it all day and had done quite a lot of work on it. When I reopen the file, it shows a version with none of ...
15
votes
7answers
718 views

How to search Dataset to find all keys share same Value

If I have the following Dataset ...
5
votes
1answer
255 views

HOWTO encode/decode large chunks of Mathematica code/results e.g. for posting on sites?

At times, we as questioners would like to post huge Mathematica-expressions to websites (e.g. mathematica.stackexchange.com), or have an easy way to get such code from a site. Above a certain size, <...
4
votes
0answers
82 views

What is Association[Rule[“ID”,number ] and how it is used

I am trying to understand the structure and the use of Dataset and I came across something new to me. First check this example: ...
16
votes
6answers
3k views

3D surface that looks like a virus

I have been recently using Mathematica for composing animations that are part of the supplementary information of my papers. I am currently trying to build an animation that involves a viral ...
0
votes
1answer
60 views

Fit process parameters to a transformed AR(1) process

I would like to fit the parameters of an exponented AR(1) process using Mathematica's EstimatedProcess, however, the function does not seem to evaluate to anything. First of all I create the ...
2
votes
1answer
62 views

Adding a title to TreePlot

This is a basic question I am sure, but cannot seem to find the answer in the documentation. Does anyone know how to add a title to a TreePlot?
2
votes
1answer
75 views

Export the animation labeled with time in the animation?

I want to export the solution of a equation ...
0
votes
1answer
62 views

Compute the evolution of several quanties from a data file

This question is somehow a part II of this: Part I. Here comes a small data sample as a minimal working example: ...
1
vote
0answers
85 views

Autoloading attempting to follow Roman Maeder's master package instructions

I am trying to use the Master Packages discussion from "Programming in Mathematica" by Roman Maeder. I have a directory: D:\at_work\mathematica\JacksPackages ...
0
votes
1answer
76 views

Use of Replace function [closed]

I would like to replace in an expression two functions x[t] and D[x[t],t] by two variables x ...
3
votes
1answer
148 views

Handling error in WSTP program C/C++

I have a program, written in C++, which uses WSTP to communicate with Mathematica 10 (i.e., linked using Install["name_program"]). How should my code report an ...
4
votes
1answer
211 views

How to open notebooks in already running instances of the Front End on Linux? [duplicate]

On Windows and OS X, if Mathematica is already running, double clicking a notebook doesn't open a new Front End instance. Instead it will conveniently open the notebook in the already running ...
13
votes
2answers
519 views

Change Values in Dataset under Condition

I have the following Dataset: ...
1
vote
0answers
126 views

How to find Pauli matrices

I wanted to find the Pauli matrices, so i wrote down this code: z = {{a, b}, {c, d}} i = {{1, 0}, {0, 1}} Solve[z.z == i, {a, b, c, d}] and mathematica gave me ...
0
votes
1answer
204 views

How to Obtain a ListPlot in each loop of Do[]. BUT not a list of plots after the DO[] [duplicate]

I´m trying to obtain ListPlot inside a DO loop but, always I can see the final semicolon in red, and the code runs well except the PLOTS. How can I obtain the ListPlots in each iteration? ...
2
votes
4answers
218 views

Alternative representations of a polynomial

Suppose we have the polynomial $z^4-2 z^3-12 z^2+13 z+11$. $\;$Is there a way to manipulate it into $(z^2-z)^2-13 (z^2-z)+11$ ? How should I tackle this problem ?
1
vote
3answers
281 views

How to select elements from a list by condition?

Considering I have a list: F = {f1, f2, f3, f4} I want to perform exponent on the list F = Power[#, 2]& /@ F Now I ...
0
votes
1answer
91 views

How to create a line due to requiriements?

Considering we have three lines, and know the intersection points (How to find intersection points of lines?) How can I draw a line that will cross the intersection point of the two lines and will be ...
1
vote
0answers
130 views

How to add a Bar Legend to a density plot over the surface of a sphere?

I have a function with variables (theta,phi) the spherical coordinates. I want to represent it as a density plot over the surface of a sphere. following an answer to a previous question Density ...
2
votes
3answers
3k views

How to find intersection points of lines?

Considering I have three functions f1 = -x + 1; f2 = x - 1; f3 = x + 3; How can I find the intersection points of this functions? Thanks. This didn't work <...
5
votes
1answer
145 views

Using mathlink/WSTP with fortran

I would like to access Mathematica functions from within a Fortran program. I am unsure how to start (which is probably related to my lack of up-to-date Fortran knowledge). Is it necessary to write a ...
0
votes
2answers
46 views

ReplaceAll with serveral variables. get all combinations

How can achieve something like this? a * b /. {a -> {1, 2, 3}, b -> {10, 100}} I want {10,100,20,200,30,300} or ...
2
votes
1answer
282 views

How to abort running evaluation?

I would like to implement a "Stop" Button into a program that basically consists of a loop. Unfortunately I do not how to interrupt the running evaluation. Minimal Example: ...
2
votes
4answers
213 views

Pure function, one slot refers to List-position

I used all my google-fu trying to find how to make this work; read the docs as well. What have I missed? I feel sure this can't be a new question, but I can't find anything Here is is: ...
0
votes
2answers
114 views

Flipping Vertical Axis in ParametricPlot [duplicate]

Basically, I'm trying to "rotate" a plot clockwise so that the former x-axis is pointing down, and the former y-axis is pointing to the right. From reading some answers on here, I gathered that I can ...
-1
votes
1answer
187 views
3
votes
1answer
236 views

Convert C program using mathlink to WSTP

I have been using heavily a custom frontend to mathematica based on mathlink. I derived it from http://library.wolfram.com/infocenter/Demos/174/frontend.c?file_id=4692 . I just learned that mathlink ...
5
votes
2answers
140 views

Color edges of a multigraph when there are parallel edges using Graph[] and EdgeStyle

This a related question to : How can I display a multigraph with different colored edges? However I'm not using GraphPlot. Instead I'm using Graph and EdgeStyle attribute. Take this graph : How can ...
1
vote
1answer
94 views

Hypothesis Testing and Formatting Output

I am trying to write a function that tests hypotheses and gives me a nice table but I can't. I need forum's help. For example, I have the following data ...
0
votes
1answer
259 views

How to solve a large system of non-linear equations

I would like to solve Saha equations on Fe, which have 27 unknowns. Saha equations basically give you the ratios of the unknowns, but the unknowns are subject to constraints. What function shall I ...
7
votes
2answers
1k views

Dramatic speed difference of code on Matlab and Mathematica

Background: I was trying to convert a Matlab code (fluid simulation, SPH method) into a Mathematica one, but the speed difference is huge. Matlab code: ...
0
votes
0answers
65 views

What is the product of 1+1/p^2 over all primes p? [duplicate]

Can Mathematica Sum or Multiply over the set of all primes? I can get an estimate of my question in the title with: ...
1
vote
1answer
82 views

Cannot evaluate TransformedDistribution for vectorial sum

I'm trying to obtain the distribution of the magnitude (length) of the vectorial sum of two vectors under a random (uniformly distributed) angle $\phi$. The sum is $\sqrt{x^2+y^2+2xy\cos(\phi)}$, ...

15 30 50 per page