# All Questions

23 views

### Using Compile with functions of n dimensions

I am currently working on problems that need to use variables in n dimensions. So I designed the functions that fit my problems. In particular the following functions : ...
84 views

### How to restrict the motion of a Manipulate-generated Locator along a line?

If one uses a stand-alone locator and needs it to only be movable along a curve, say, defined by a function f[x], one can use a simple construct: ...
105 views

### Solving a differential equation with NDSolve and plotting it WITH the use of Manipulate

I want to solve, let's say, this differential equation: y'[x]=y[x]^n Given any initial condition (which I might want to manipulate too). I want to plot the ...
2k views

### How to improve the performance of solutions to Project Euler (#39)?

This is the problem 39 of Project Euler, which I asked in the chat room two days ago. My original code runs as slowly as snails, and finally I got two answers from JM and Rojo. Unfortunately, both of ...
9 views

### Nonlinear boundary value problems for fourth order ordinary differential equations

I am trying to solve a set of equations which are fourth order equations. I want to get the value of w ...
39 views

### What is the most practical way to define a “default” value for an Association?

It can be very useful to define background or default value for an object that can be incremented or otherwise modified. A simple (and for me, common) use is a counter: ...
40 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 ...
41 views

### TargetFunctions option in FindDistrobution yields error

I have some data set that I am trying to find the maximums . I figured I could do this by fitting the many peaks of the dataset to Gaussian distributions and then finding the peaks of this data from ...
20 views

### Non-autonomous Dynamical system Sliding mode controller Error

This code is a simulation of a sliding mode controller of a non-autonomous dynamic. When I use ArcTan in input, I receive an error. ...
44 views

### Aligning Density an Contour Graphics

In radiation therapy, we display radiation dose as an isodose contour plot overlain on density plot describing the patient geometry (CT data). Here is a simple example (the material grid is voxelated ...
65 views

### Orderless storage of tabulated function values

I would like to elaborate on my previous question Function of arguments given in non-fixed order and a relevant related one Best practice of passing a large number of parameters to functions I find ...
31 views

### Ndsolve problem with Sign

Using Sign(...)] in the formulation of my system of ODEs is causing an error that I don't know how to correct. If I use (...) in ...
32 views

### How can I get the value displayed by a labeled animator control to read in degrees?

I have thus far: ...
65 views

### Getting a correct custom legend for contourplot?

I am having trouble making a custom range for a legend in ContourPlot since the legend doesn't "talk" to the PlotRange and ...
464 views

### Animated Wave propagation using split operator method

Here is the state of the art: By solving the time-dependent Schrödinger equation, one obtains that the propagated wave function after time step $\Delta t$ can be calculated by applying the ...
417 views

### Locators in Manipulate not moving properly

I thought a simple Mathematica kerning machine (for adjusting the space between characters) would be interesting, but I'm having trouble with the locators. (There are a number of other questions ...
48 views

64 views

### Is it possible to find the size of a variable in a notebook?

I have a fairly large a list of matrices matsLst, which takes about 15 minutes to compute (but computes successfully each time). I can test in the notebook that ...
27 views

...
5k views

### Increasing the thickness of line in plot legend

I've been using the shiny new legends in V9 for my plots. However, I usually increase the Frame/Axis ...
271 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: ...
25 views

### CCompile Problems

Operating System: Windows 8.1 Mathematica: 8 In possession of: Visual Studio 2013 and 2015 Had to alter the visual studios driver file within CCompilerDriver application, add-on so that it found the ...
50 views

### Multidimensional Interpolation with 3 independent Variables with modfied data set

I have four column data with first 3 column denoting x,y,z and fourth column energy. x variable is actually angle. Now I want to interpolate over all three indepdent variable (x,y.z) with ...
245 views

### Hypergeometric function with a matrix argument

I am looking for the evaluation of a Hypergeometric function with a matrix argument as for example in Koev and Edelman or as showcased in this Wikipedia article. From what I understand from ...
23 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 it's a psudo-code; ...
48 views

### Better way to binarize an image [on hold]

I have an image that I want to binarize. When I try to do it in Mathematica, the results is My code is ...
106 views

I'm trying to import this table from a wikipedia page containing the list of lunar missions into a Mathematica as an Association. Here, I'm trying to use the new ...
103 views

Referring to the method I proposed for Problem with ParametricPlot Mathematica 10.0.2 throws an enigmatic error message: ...
27 views

543 views

### Specific Mathematica algorithms, for example LU Decomposition

Where I can find detailed information on algorithms used by Mathematica, especially for numerical methods. The Manual doesn't seem to iclude specifics in most cases. For example I get a different LU ...
62 views

### Why is PolyLog[] giving weird answers for ordinary values? [duplicate]

Possibly related to this question, but it seems slightly different: Strange behaviour of PolyLog Function Wikipedia says that for real s, z<1 should be real. So I was confused when MMa returned: ...
45 views

### Stopping NDSolver at time of error

I am using NDSolver and WhenEvent to solve a system of differential equations. I get this message: ...
36 views

### Please explain this unexpected code snippet behavior [duplicate]

Consider a function that maps a complex function z->f(z) to it's multivariable counterpart (x,y)->f(x,y) ...
67 views

### How to calculate residues using different branches of the logarithm

My goal is to be able to compute the residues of something like $z^{\alpha} R(z)$ where $0 < \alpha < 1$, $R(z)$ is rational, and the exponential can be chosen with any branch. I found a way to ...
533 views

### Creating hexahedral finite elements in Mathematica

Is it possible to do FEM using hexahedral elements in Mathematica? If it possible, is there any help to do that?
82 views

### Demonstration Confusion

What is the proper way to open a Demonstration in Mathematica so that the code is visible and can be evaluated from the Evaluation menu, as though I had created it myself? Explanation: When I ...
119 views

### Finding the conditions for degenerate solutions to a cubic equation

I have a cubic equation (corresponding to the band structure of a physical system) given by w in the code below. ...
48 views

### Minimax for conditioned UnitStep functions

I made a simplified version of my problem, and I have now: ...
61 views

### gaussian integration

I'm new on Mathematica and I am an engeneer with only a little base of numerical computation. I have to integrate a trigonometrical function numerically with a Gauss integration. The function is: ...
77 views

### Matrix multiplication for higher dimensional matrices [duplicate]

I have a matrix like this (myb1): I would like to get the matrix multiplication of each of the submatrix to itself. For example the first 2x2 matrix \$\begin{bmatrix}1 & 2\\1 & ...