# All Questions

100 views

### Bug with LinearProgramming on Integers?

With Mathematica 7: LinearProgramming[{1, 1}, {{0, 0}, {1, 1}}, {1, 1}, Automatic, Integers] gives wrong result {0,1}. But ...
137 views

### Represent more nested dataset with the same color in the PieChart

I have multiple dataset that I want to plot in PieChart, as in PieChart[{{2, 2}, {1, 2, 4}}, ChartLayout -> "Stacked"] Now here is the catch: I want the color ...
189 views

### Extra brackets of Position command

Command Position always comes with two extra curly brackets {{}} when it's just one index for the location. I use [[1,1]] in front of my position commands. Is there ...
457 views

### How to resolve the duplicate error during interpolation

I have few hundred data points corresponding to an irregular shape closed curve. As the result I have data points that have the same value of y but different values of x. I want to create an ...
536 views

### NMinimize to optimize function Module

I am using Nminimize for simulation based optimization. I define the objective function (simulation with a variable "a") as a module to be used in the minimization. ...
391 views

### Errors when plotting Exp[-x]/x for large values of x [duplicate]

I am trying to plot a very simple function f[x_]:=Exp[-x]/x on a log-log scale like this LogLogPlot[f[x], {x, 10^(-5), 10^7}] ...
289 views

### choosing the fastest way of finding position

I have this list {1,7,8,10} for instance. and a second list which is always smaller or equal to the first one say {10,7}. How ...
140 views

### Setting plot size within vector; dynamic slider (two part question)

I have a question about the size of a plot in mathematica. I'm working on some differential equations (a simplified model of heat transfer in a building). I've programmed it so that you can set ...
145 views

### A list containing zero elements

I have a list containing zero and nonzero elements. How can I throw away zero elements and just keep non zero ones.
77 views

### Finding series expansion in parametric setting

Suppose $y=f(x;p_1,p_2,...)$ and $t=g(x;p_1,p_2,...)$ are given where $p_1,p_2,...$ are some parameters. We want to find a series expansion of $y$ in terms of $t$. Is there a direct command or ...
132 views

### Minimizing the maximal residual in mathematica

With this: d1 = 10; d2 = 4; mat = RandomReal[{-1, 1}, {d1, d2}]; vec = RandomReal[{-1, 1}, d1]; LeastSquares[mat, vec] ...
44 views

### SQLDateTime from a time column is missing the milliseconds component

Can anyone confirm this? I am using M9.0.1 on win7 64bit connecting to a SQL Server db. When I fetch a datetime column the SQLDateTime objects contain 6 entries, 5 integers and a fractional second ...
2k views

### Contracting with Levi-Civita (totally antisymmetric) tensor

I have an array $v_{ijk}$ which is effectively a rank-$3$ tensor with dimensions $3\times3\times3$, and I need to contract it with $e^{ijk}$, i.e. evaluate $v_{ijk} e^{ijk}$ (see Einstein ...
2k views

### Something faster than Do loops with AppendTo

I am an "old" programmer used to Fortran and Pascal. I can't get rid of For, Do and While ...
201 views

### How to control the order of meshing？

I want the first pic，but i got the second. What can I do? Below if the code to produce the second pic: ...
189 views

### Experimental`NumericalFunction in NMinimize solution

I try to make a number of optimizations using this code: ...
440 views

### Histogram plot with descriptive statistics on the plot

I am wondering in Mathematica Can we generate histogram plot with descriptive statistics, such as mean, median, and skewness, attached to the plot ? For example, we may place all the statistics to ...
421 views

### Band Intensity Quantification

I would like to measure the density of my western blot band by measuring the area under the peak from this plot. More specifically, my image will have several lanes with a pattern of bands in each ...
113 views

### Speeding up Integrate and the numerical solution

I want to compute the drag of a plate Below is the code I am using to integrate the function ...
159 views

### Memory issue when using LinearSolve

When I use LinearSolve to solve a large system of linear equations where the left hand side is a matrix and the right hand side is a vector, the process takes a ...
33 views

### How to Invert a Multivariate Interpolating Function? [duplicate]

I used NSolve on a partial differential equation with boundary conditions to get a numerical solution that Mathematica says is of the form InterpolatingFunction. I then defined a function f(x,y) which ...
160 views

### How can I change label colors in a colored chart?

I am trying to make a chart with labels, but I would like for the labels on the chart to be white for purposes of visibility. I am aware of the ...
116 views

### Manipulates Behaving Badly--Why is it autoupdating?

In working on a simple simulation I came across the following Manipulate quirk (bug?) and I want to know how to get around it. Here is the first pass code, which acts as expected (but is incorrect): ...
513 views

### How can I generate and randomly assign color to annular sectors?

How can I generate such an image and fill every annular sector with a random colour?
134 views

### Explore a nested list

This question is similar to Numbering nested list according with Depth (or Level) I have a list like ...
214 views

### Getting MIDI SoundNote Pitches as Numeric Values

I'm trying to do some evaluation on notes (specifically the pitches) imported from a MIDI file. I've imported a list containing tracks of sound notes with ...
310 views

### Infinite expression 1/0.^(1/4) encountered in NDSolve

I am trying to solve very simple system of coupled differential equations using the NDSolve function, but I am getting ...
389 views

### How to use NIntegrate when there are symbolic constant coefficients

I would like to numerically integrate an equation such as the one below in which there are symbolic constant coefficients. I used a very simple code but it doesn't work in general, that tried to deal ...
277 views

### Fixed-Point Numbers in Mathematica

I am working with a library that needs input in a Fixed Point notation. I’d like to figure out a way to convert the floating point results into fixed point representation. The fixed point length is ...
45 views

### Use TeX in Graphics object [duplicate]

Graphics[Text[Style["Sqrt[a^2-b^2]", FontSize->25], {0,0}]] yields: but I want the nicer looking $\sqrt{a^2-b^2}$ instead of the ugly "Sqrt[a^2-b^2]". ...
133 views

### Simplify using functional equations

Is it possible to simplify assuming a functional equation, for examlpe to use that one function, g, is the invers of another, f. Simplify[g[f[x]], g[f[x_]] == x] ...
1k views

### Connecting to Raspberry Pi's Wolfram Language kernel from a PC's Mathematica front end

Recently I bought a Raspberry Pi and I installed the Wolfram Language on it. Comparing WL 10.0's commands with Mathematica 9.0.1.0's commands, I found 328 additional commands and variables. I ...
75 views

### How to use ImageMultiply[] over a list of strings?

I'm trying to do the following: ...
513 views

### Series expansion using an exponential basis

I am currently trying to Laplace invert an expression with the following pattern  \frac{s \alpha \text{Cosh}[s(L-x)]+\beta \text{Sinh}[s(L-x)]}{s(\gamma \text{Cosh}[sL]+s \delta \text{Sinh}[sL])} ...
232 views

### Simulated Annealing Parameters and Results [closed]

I am using SimulatedAnnealing method for a simulation based optimization problem and was wondering if someone can enlighten me on the following features: Is there ...
354 views

### Defining Piecewise Functions in Modules

In short, my question is the same as my previous one except that everything is now wrapped up in a module. The relevant code I'm working with is: ...
63 views

### How does parallelization of LibraryLink function call work?

I'm trying to call a C function in parallel through LibraryLink. Here is an example kind of demonstrates that library function can be used in parallel. My question is what happened in the library ...
821 views

### Is there a way to stop evaluation immediately?

Sometimes I'll have a loop that I accidentally made too big. I'll evaluate, and MM will try to run through the entire loop. The program itself doesn't actually seem frozen... I can go to Evaluation-> ...
77 views

### Plot hangs Mathematica through NETLink

I have a C# function that calls Mathematica via Wolfram.NETLink. On our home computers all the test calls work perfectly, but on our AWS server (both a microinstance and a beefy c3.xlarge instance), ...
320 views

### Using an ellipse as a threshold for Nearest function

The Nearest function can receive as a threshold parameter a radius to look for elements inside that. From the documentation: ...
255 views

### Image basics in mathematica

1) How the pixel values are defined in mathematica or how it is different from matlab? 2) I am wondering how image properties are different in mathematica, and how they are calculated? ...
271 views

### Generating a (random) 2-dimensional cellular network

I want to generate a network of random cells like the following picture: The general idea is to generate some random points (x,y) as coordinate of a vertex and then randomly choose some of these ...
129 views

### How to calculate the residue of $1/f(z)$ at a numerical approximation to a root of $f(z)$?

The input Residue[1/DirichletL[19,10,s],{s,s0}] gives 0 even when s0 is a root. For ...
631 views

### How to build a funcion that returns a piecewise function

I dont know how to go ahead with this The problem statement is "Make a piecewise linear function maker that accepts lists of points as input and has a piecewise linear function as the output". Lets ...
258 views

### How to understand shared passing of a MTensor in LibraryLink?

According to the documentation, there are four different type of memory managing when passing a MTensor with LibraryLink: Automatic, "Constant", "Manual" and "Shared". The Automatic and "Manual" is ...
216 views

### Problems with series of generalized hypergeometric functions

I have been trying to do the following series: Series[HypergeometricPFQ[{1, 4, 4}, {4 - Sqrt[3], 4 + Sqrt[3]}, z],{z,1,0}] Mathematica says that the result is ...
754 views

### histogram fit for probability density [closed]

I am trying to fit the (probability density) histogram of some data with the exponential function, but I am having difficulties. My raw data are in file called ...
44 views

### Updating List with Do works but not with ParallelDo [duplicate]

I am trying to find 5 minimas for some function. I can obtain the results if I implement a simple Do function. I tried to speed it up by using ParallelDo and then my code returns spurious results. ...