# All Questions

153 views

### Dataset vs an association of associations

Associations with a record structure (e.g., a flat table) can be organised in one of two main ways. First as a list of associations, which is also used in the case of Mathematica's data set ...
10 views

### Random non-overlapping disks in a square

I've found a nice code snippet from this place (last code on that page), that I'll reproduce here for reference : Plotting random circles in a square ...
5 views

### Can someone tell me what mr is in the following code? [migrated]

I found this algorithm to convert a rotation matrix into a quaternion but i can't seem to understand which matrix mr is? If mr is the rotation matrix then what is mat? ...
22 views

### Performing a convolution for smoothing a function

I want to smooth a one-dimensional oscillating function by convolving it with another function that I'll call the screening function. The screening function has a trapezoidal form and goes to zero ...
5k views

### Minimal effort method for integrating C++ functions into Mathematica

As of Mathematica 8, what is the minimal effort way to integrate an existing C++ function into Mathematica? I think we have these: MathLink (it was quite long ago I used it last time) communication ...
21 views

### Linking to C++ files

I have written mathematica file that does manipulations on a certain set of points. I would like to access code that someone else has written for a least square fit in C++. How do I access this C++ ...
646 views

### How to sort colors properly?

I can't seem to be able to sort colors by their hue and perceptual brightness correctly. Here's my current solution but it's not right, there are all these dark bands: ...
27 views

### How do I extract units from an expression

I need to take the units off of this expression: (5 Coulomb)/(6 Second) In order to do some unit simplification. Is there any way to do this? I have tried Case, but could not get it to work ...
29 views

### Solving a transcendental equation

I want to solve the a transcendental equation, e.g. NSolve[-(1-x)*Log[1-x] - x*Log[x] == 0.5, x] Mathematica is not able to solve, wheres WolframAlpha -- is able ...
14 views

### Set control “A” to a specific value if control “B” is ever changed (Manipulate)?

I've had trouble with this and issues similar to this in the past, where I need to track when a controlled variable is changed. Basically I have two Sliders (call ...
23 views

### Converting a quantity to a decimal form

I have a function giving me this: (5 Coulomb)/(6 Second) as output. I want this in decimal form and would like to have the variables taken off the end for unit ...
35 views

### How to use locally scoped dynamic variables in Manipulate for expression and control parameters

I have a Manipulate that has dynamic variables that I want to use in the displayed expression and use in the parameters for the manipulate controls. I only ...
142 views

### What's wrong with Simplify and FullSimplify?

I have a quite complex list of equations and inequalities I combine to a boundary condition for my cost function. After investigation of two days I found the bug (I really name it a bug!). One of my ...
94 views

...
89 views

### How can I solve the sum with two unknowns?

I have the following code description ...
71 views

### Alternative to use a function as an argument in Compile

I am currently working on problems that require the use of functions such as : ...
42 views

### Reduce Inequality

How can I reduce the inequality in terms of modulus of alpha. ...
115 views

### Efficiently test membership for a list of values

I have two lists: excluded and values. I would like to efficiently determine whether ...
133 views

### Fitting - Exponential

I'm trying to fit the following data using Mathematica, but unfortunately im not getting any decent results. ...
100 views

### How to declare a function as real in order to get rid of Conjugate in front of the expressions?

I have a complicated complex function containing some other ones that are real, f=f(A,B,C,...) ,where A=A(r) and it is real, for ...
258 views

### How I can integrate $\int_0^{a} x e^{-\frac{b^2 x^2}{2 c}} J_0(n x) dx$?

How can I get a solution to the integral given below ? $\quad \quad \int_0^{a} x e^{-\frac{b^2 x^2}{2 c}} J_0(n x) dx$ where $a,\,b,\,c$ and $n$ are constants and $J_0$ is a Bessel function of the ...
41 views

### If statement for evaluating small values

I have a simple calculation which I am trying to use if condition to evaluate summation of some values, here's a code; ...